Jeff Spall Posted November 29, 2002 Share Posted November 29, 2002 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 Link to comment Share on other sites More sharing options...
Garry Claridge Posted November 30, 2002 Share Posted November 30, 2002 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 Link to comment Share on other sites More sharing options...
Vaughan Posted December 1, 2002 Share Posted December 1, 2002 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. Link to comment Share on other sites More sharing options...
Jeff Spall Posted December 2, 2002 Author Share Posted December 2, 2002 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 Link to comment Share on other sites More sharing options...
Garry Claridge Posted December 2, 2002 Share Posted December 2, 2002 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 Link to comment Share on other sites More sharing options...
Jeff Spall Posted December 3, 2002 Author Share Posted December 3, 2002 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 Link to comment Share on other sites More sharing options...
Jeff Spall Posted December 3, 2002 Author Share Posted December 3, 2002 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 Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7943 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