November 29, 200223 yr Hi, I'd like to have a value list where the displayed value is different from the value passed to the database, like: <SELECT NAME=stuff> <OPTION VALUE=1>first item <OPTION VALUE=2>second item </SELECT> ...rather than <SELECT NAME=stuff> <OPTION VALUE=first item>first item <OPTION VALUE=second item>second item </SELECT> is there a way to get this from Filemaker, rather than just write it into the page? thanks, jeff
November 30, 200223 yr I don't think any method exists to get this from FM. I have been able to create dynamic ValueLists with Javascript Arrays and the "onchange=" parameter. However, this depends on how the data is organised. All the best. Garry
December 1, 200223 yr You could do this by manipulating the data in the file rather than the web page. Make a normal value list, use it to enter into a normal field via the submit. In the database use a calc based on the field to generate the "real" value.
December 2, 200223 yr Author Hi, thanks Vaughan, Garry I think that a calculation might be a possibility. I guess I could assemble all of the html for the popup in a Filemaker calculation and deliver that as a field, but it might be as much work as altering the pages now and then. The reason for wanting to do this is that when I have 'hard coded' list in pages, I always forget to change them when the data changes, so I like them to look after themselves. thanks, Jeff
December 2, 200223 yr You could use a Calculated concatenation with a separator for the ValueList field ; e.g. "1:first item". Then with some Javascript place them on the desired locations, like this: <select name="stuff"> <script> [FMP-ValueList: Groups, List=GroupList] val = "[FMP-ValueListItem]".split(":") ; document.write("<option value='" + val[0] + " [FMP-ValueListChecked]>" + val[1] + "</option>") ; [/FMP-ValueList] </script> </select> I haven't tried this. Good Luck. Garry
December 3, 200223 yr Author Hi, thanks Garry, I hadn't seen 'split' used before - i think I could use this as I then only have to keep the list up to date in one place, which is great. I kinda knew you would ask me to excercise my miserably inadequate Javascript skills, though regards, jeff
December 3, 200223 yr Author Hi, thanks Garry, I hadn't seen 'split' used before - i think I could use this as I then only have to keep the list up to date in one place, which is great. I kinda knew you would ask me to excercise my miserably inadequate Javascript skills, though. regards, jeff
Create an account or sign in to comment