Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8792861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:02:31+00:00 2026-06-13T23:02:31+00:00

I’ve created a keyword’s property type using the textbox multiple data type. The keywords

  • 0

I’ve created a keyword’s property type using the textbox multiple data type.

The keywords are then seperated into a list of words or phrases seperated by commas.

I’ve wrapped the keywords in A tag with the href linking to my search page, and including the value of the keyword so that all nodes with the same keyword will display in my search.

I want to add an option where a user can select from checkboxes with the value of the keyword, and submit a search so all checked keywords are included in the search.

enter image description here

I need help with figuring out how to get the checked values of the list of keyword checkboxes to submit and display the results on my seach page.

Here is what I have so far, which doesn’t submit and I can’t find where to add the values of the checkboxes:

<xsl:if test="string($currentPage/keywords) != ''">

<!-- get the contents of the textbox multiple, with commas -->
<xsl:variable name="textWithBrs" select="umbraco.library:ReplaceLineBreaks($currentPage/keywords)"/>

<!-- replace commas with pipes so you can use Split -->
<xsl:variable name="textWithPipes" select='umbraco.library:Replace($textWithBrs, ", ", "|")'/>

<!-- split into an array of items and output as unordered list -->
<xsl:variable name="items" select="umbraco.library:Split($textWithPipes, '|')"/>
<ul>
  <xsl:for-each select="$items/value">
    <li>
      <input type="checkbox" value="true" keyword="{.}" id="{.}" name=""/>
      <a>
      <xsl:attribute name="href"> <xsl:text disable-output-escaping="yes">/imagery/image-search.aspx
      <![CDATA[?]]>
      search=</xsl:text> <xsl:value-of select="." /> </xsl:attribute>
      <xsl:attribute name="title"> <xsl:value-of select="."/> </xsl:attribute>
      <xsl:value-of select="."/> </a> </li>
  </xsl:for-each>
</ul>
<input type="submit" value="Search" id="btnSearchBottom" name="" onclick="location.href='/imagery/image-search.aspx?search=otbra'" />
</xsl:if>

Any assistance would be greatly appreciated.

Cheers, JV

I’ve made some edits and now have it semi-working. However my Umbraco template has a form wrapping my content. Which I think is what is causing some issues.

In my testing I’ve had a form wrapping my XSL code. When I click on the “submit” button nothing happens, but if I have a duplicate of the same code the second list of checkboxes will be able to submit. Also when I make multiple selections the search results try to look for “one,two” which don’t return any results (/image-search.aspx?search=one&search=two). It should search for “one two” (/image-search.aspx?search=one%20two).

My code with the repeated form:

<div style="display:none;">
  <form name="input" action="/imagery/image-search.aspx" method="get">
    <ul>
      <xsl:for-each select="$items/value">
        <li>
          <input type="checkbox" name="search" value="{.}"/>
          &nbsp; <a href="/imagery/image-search.aspx?search={umbraco.library:UrlEncode(.)}" title="{.}"> <xsl:value-of select="."/> </a> </li>
      </xsl:for-each>
    </ul>
    <input type="submit" value="Submit"/>
  </form>
</div>
<div>
  <form name="input" action="/imagery/image-search.aspx" method="get">
    <ul>
      <xsl:for-each select="$items/value">
        <li>
          <input type="checkbox" name="search" value="{.}"/>
          &nbsp; <a href="/imagery/image-search.aspx?search={umbraco.library:UrlEncode(.)}" title="{.}"> <xsl:value-of select="."/> </a> </li>
      </xsl:for-each>
    </ul>
    <input type="submit" value="Submit"/>
  </form>
</div>

Then I tried the following code, which didn’t require to wrap the list in a form. Again multiple selections don’t work, but also the only result returned is the first input value in the list (in this case ‘one’).

<ul id="checkboxes">
  <xsl:for-each select="$items/value">
    <li>
      <input id="{.}" type="checkbox" name="search" value="{.}"/>
      &nbsp; <a href="/imagery/image-search.aspx?search={umbraco.library:UrlEncode(.)}" title="{.}"> <xsl:value-of select="."/> </a> </li>
  </xsl:for-each>
</ul>
<input name="searchbutton" class="button" value="Search" type="reset" onClick="location.href='/imagery/image-search.aspx?search=' + $('#checkboxes input').attr('value')" />

So I need help with which option to use, and how to include multiple selections in the search result.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:02:32+00:00Added an answer on June 13, 2026 at 11:02 pm

    A few notes

    • You seem to be unaware of attribute-value-templates. They replace the need for <xsl:attribute> in most cases. Use curly braces to evaluate expressions in attributes.
    • Always (!) URL-encode values that you put into an URL. Compare tha <a href="..."> below.
    • When a form field does not have a name, its value will not be submitted by the browser. An ID on the other hand is not necessary.
    • Using <xsl:if test="string($anything) != ''> is not necessary. A non-empty string is truthy, so <xsl:if test="$anything"> is sufficient.
    • Don’t use onclick in the submit button if you want your form to transmit. Use the <form action="..."> parameter to determine where form values should be transmitted to. Or use JavaScript, but completely avoid inline script handlers like "onclick". There should be no JS in your markup at all.

    XSL code

    <xsl:if test="$currentPage/keywords">
      <xsl:variable name="textWithBrs" select="
        umbraco.library:ReplaceLineBreaks($currentPage/keywords)
      "/>
      <xsl:variable name="textWithPipes" select="
        umbraco.library:Replace($textWithBrs, ', ', '|')
      "/>
      <xsl:variable name="items" select="
        umbraco.library:Split($textWithPipes, '|')
      "/>
      <ul>
        <xsl:for-each select="$items/value">
          <li>
            <input type="checkbox" value="true" keyword="{.}" name="keywords"/>
            <a href="/imagery/image-search.aspx?search={umbraco.library:UrlEncode(.)}" title="{.}">
              <xsl:value-of select="."/>
            </a>
          </li>
        </xsl:for-each>
      </ul>
      <input type="submit" value="Search" id="btnSearchBottom" />
    </xsl:if>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.