SarahF Posted October 7, 2005 Posted October 7, 2005 Hi guys, Trying to properly display information....A user fills in the form by checking radio buttons and a menu where you hold down cntrl to select multiples. After submission, they can pull it back up to edit their information, but none of the radio buttons are checked, nor are the menu items highlighted. I know there must be a way to fix this! but what is it??? Thanks!
Garry Claridge Posted October 9, 2005 Posted October 9, 2005 Are you using Custom Web Publishing (CWP) and CDML? Garry
SarahF Posted October 10, 2005 Author Posted October 10, 2005 I'm not familiar with those terms... I'm coding the pages in Dreamweaver and using a form to interact with FP.
Garry Claridge Posted October 11, 2005 Posted October 11, 2005 How are you displaying the other information in the Form? If you are using CDML here is a method for Radio Buttons: Yes No Here is a method for using a ValueList and Checkboxes: [FMP-ValueList: Countries, List=Countries] [FMP-ValueListItem] [/FMP-ValueList] All the best. Garry
SarahF Posted October 13, 2005 Author Posted October 13, 2005 Thanks Gary, I got the checkboxes working! How would this work if I'm using select statements for the menu lists? Sarah
Garry Claridge Posted October 13, 2005 Posted October 13, 2005 You could do something like this: [FMP-ValueList: town, List=Towns] [FMP-ValueListItem] [/FMP-ValueList] Good Luck. Garry
SarahF Posted October 13, 2005 Author Posted October 13, 2005 Ok, we're closer. It won't allow me to choose more than one selection though and it doesn't highlight the ones that were picked in the database. Any ideas? Thanks so much. Sarah
Garry Claridge Posted October 14, 2005 Posted October 14, 2005 To select more than one item you can try: We may need to see your page to find out what is happening. Are you using a "Repeating" field? All the best. Garry
SarahF Posted October 16, 2005 Author Posted October 16, 2005 Hi Garry (sorry I left a r out of your name last time!) Here's the code I have now: [FMP-ValueList: Clinical Specialties, List=Clinical Specialties] [FMP-ValueListItem] [/FMP-ValueList] It lists the options beautifully, but still doesn't select the ones that have been highlighted in the database. At this point, I allow people to select as many options as they want. Thanks! Sarah
Garry Claridge Posted October 16, 2005 Posted October 16, 2005 Using a bit of Javascript works for me: Country: [FMP-ValueList: Countries, List=Countries] if ( myselection == "[FMP-ValueListItem]") { document.write('[FMP-ValueListItem]'); } else { document.write('[FMP-ValueListItem]'); }; [/FMP-ValueList] I'm not sure how this will work with multiple values! Maybe have to check if the ValueListItem is contained within the field value. All the best. Garry p.s. I believe the [FMP-ValueListChecked] is not working because it is inserting the word "checked" instead of "selected".
SarahF Posted October 17, 2005 Author Posted October 17, 2005 Hello there, I've got it working for one! Thank you much. I tried this for multiples, it didn't work, but I wanted to see if you had any ideas of if something along these lines could work: [i've just taken your code and added a for loop, then added the i's to the end of the ValueList, hoping it would cycle through them.] myselection = "[FMP-Field: Clinical Specialties]"; [FMP-ValueList: Clinical Specialties, List=Clinical Specialties] if ( myselection == "[FMP-ValueListItem]") { document.write('[FMP-ValueListItem]'); } else { document.write('[FMP-ValueListItem]'); }; [/FMP-ValueList] } Thanks again! Sarah
Garry Claridge Posted October 17, 2005 Posted October 17, 2005 Give this one a go: [FMP-ValueList: Clinical Specialties, List=Clinical Specialties] if ( myselection.search("[FMP-ValueListItem]") >= 0) { document.write('[FMP-ValueListItem]'); } else { document.write('[FMP-ValueListItem]'); }; [/FMP-ValueList] } Good Luck. Garry
Recommended Posts
This topic is 6969 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 accountSign in
Already have an account? Sign in here.
Sign In Now