Jump to content

This topic is 8213 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi folks,

CristyCT's post "Formattting a value list on a search results page" speaks of putting check boxes in a search results form with the field value from the record checked.

My twist is this: How is it possible to have the checkboxes displayed with all the values that have been selected from a REPEATING field, rather than a normal field?

When I try the normal approach to this (i.e. [FMP-VALUELIST: , LIST=] <INPUT TYPE="checkbox" NAME="" VALUE="[FMP-ValueListItem]"[FMP-ValueListChecked]>[FMP-VALUELISTITEM]

[/FMP-VALUELIST] ) All it checks is the value that is in the first block of the repeating field.

Thanks in advance for all your help.

Posted

Here is one I used some time ago for keeping a list of sports:

<tr>

<td>Sporting<br>

<script>

sFldValue = "";

[FMP-Repeating: sporting]

sFldValue = sFldValue + ":[FMP-RepeatingItem]";[/FMP-Repeating]

[FMP-ValueList: sporting, List= vlsports]

if (sFldValue.match(":[FMP-ValueListItem]"))

{document.write('<input type="checkbox" name="sporting" value="[FMP-ValueListItem]" checked>[FMP-ValueListItem]</option><br>');}

else

{document.write('<input type="checkbox" name="sporting" value="[FMP-ValueListItem]">[FMP-ValueListItem]</option><br>');}

[/FMP-ValueList]

</script>

</td>

</tr>


I have removed the formating, we had it displaying in columns.

Hope this helps.

Garry

Posted

Thanks Garry, it works great.

However, the purpose of page I'm using the script on is an edit page, and it doesn't seem to want to edit...

Any suggestions?

This topic is 8213 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.