0

I have a Radio Text Box in a New Form that I want to save the selections to a SharePoint field. I want options to show/hide according to a parameter passed in.

For example, if the parameter is something like ...aspx?Group=A

then I only show a certain section of the choices through the following code:

<xsl:choose>

<xsl:when test="$Group = 'A' ">
<td> Choose from the right </td>
<td><span class="ms-RadioText" title="Choice 1"> <input id="..." type="checkbox" name="..."/><label for="...">Choice 1</label></span></td>
<td><span class="ms-RadioText" title="Choice 2"> <input id="..." type="checkbox" name="..."/><label for="...">Choice 2</label></span></td>

</xsl:when>

<xsl:when test="$Group = 'B' ">
<td> Choose from the right </td>
<td><span class="ms-RadioText" title="Choice 3"> <input id="..." type="checkbox" name="..."/><label for="...">Choice 3</label></span></td>
<td><span class="ms-RadioText" title="Choice 4"> <input id="..." type="checkbox" name="..."/><label for="...">Choice 4</label></span></td>

</xsl:when>

I'm successful at getting the boxes to appear for the correct parameters, but when the checkboxes and chosen and the item is saved, the choices aren't saved to the item.

How do I get the choices to map to the item's Choice field?

0

You'll need to bind them to an existing choice field in the list or use some javascript/jQuery to set a hidden single line of text field with the selected value.

  • How do I bind them to an existing choice field? This is what I was attempting to do. – ben.fach Aug 6 '13 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.