Jump to content

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

Recommended Posts

Posted

I've checked all the threads in this forum and other online forums. I have read through the CDML Reference and have used the CDML Tool, and I cannot get the dropdown menu to work with a FMP Value List! I have been trying for two days to no avail. Here are the particulars:

the database is named call.fp5

the layout is named user

the text field is called equipment_type

the value list is called equipment

i have instant web publishing off

my code is as follows:

<FORM ACTION="FMPro" METHOD="post">

<INPUT TYPE="hidden" NAME="-DB" VALUE="call">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="user">

<INPUT TYPE="hidden" NAME="-format" VALUE="new_reply.htm">

<INPUT TYPE="hidden" NAME="-error" VALUE="new_error.htm">

<SELECT NAME='equipment_type' SIZE=1 > <OPTION VALUE=""> - No Selection - [FMP-VALUELIST: equipment_type] <option [FMP-ValueListItem]>[FMP-VALUELISTITEM][/FMP-VALUELIST] </SELECT>

</form>

now this code format for the dropdown menu is working perfectly in another FMP database. i copy/pasted from one to another, then switched the names to match the new database. that is the truly maddening part. i've made sure that i'm in browse mode. in the above example, when i go to the html page, i see a dropdown menu, and inside it reads:

- No Selection - [FMP-VALUELIST: equipment_type]

[FMP-VALUELISTITEM][/FMP-VALUELIST]

with each line being a choice in the dropdown menu.

when i threw out that code and inserted the CDML reference code, i still couldn't get it to populate the value list.

i have also tried using [FMP-VALUELIST: equipment_type, list=equipment], but that din't work, either. does anyone have a suggestion? this is frustrating. of course, i could hard code the options in, but i have projects in mind where i will need the dropdown menus to be populated through the web.

TIA,

carlos

Posted

My value lists look more like this:

<FORM ACTION="FMPro" METHOD="post">

<INPUT TYPE="hidden" NAME="-DB" VALUE="call.fp5">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="user">

<INPUT TYPE="hidden" NAME="-format" VALUE="new_reply.htm">

<INPUT TYPE="hidden" NAME="-error" VALUE="new_error.htm">

<SELECT NAME="equipment_type">

<OPTION VALUE="">

[FMP-Option: equipment_type]

</SELECT>

<INPUT TYPE="submit" NAME="-find" VALUE="Start Search">

</form>

I always put fp5 on the end of the database name, but I don't know if its required.

I haven't used size, so I ditched it. 1? Sounds small...

Equipment_type (surrounded by quotes!) must be a field, must be on your layout and must have the value list associated with it on that layout! You don't need to name the value list in your CDML, just the field that uses it.

FMP-Option, not FMP-Valuelist

I assume you just didn't paste the -find bit...

Thats all working for me. I'm sure this isn't the only way, but maybe it will help.

Cheers,

Sean.

Posted

Howdy. I remember a post where someone had trouble with valuelists and it turned out it was dependent on another DB and that CDML was not capable of doing that.

And, "Yeah.. what garry said." If your list is on your first page before you've performed any CDML actions, it won't work. Try doing a "splash/intro" page that interacts with your DB that uses your page as the format page and see if it works then.

Posted

Hi, in your first post, the code is missing the 'list' tag before the value list name. For a new record or search it should be:

<Select name="field name here">

<option value=""> - No Selection -

[FMP-ValueList: field name here, List=value list name here]

<option [FMP-ValueListItem]>[FMP-ValueListItem][/FMP-ValueList]

</Select>

It's different for an edit page where there's already a selection value to be shown, and that looks like the one seanc is using to me:

<SELECT NAME="field name">

[FMP-OPTION: field name, list=list name]

</SELECT>

The only part where quotes are needed is in the 'select name' bit.

Also, follow Garry's rules (always a good idea!) B) you must call the page though an action '&- View' etc. the valuelist must exist in your database and the field has to be on the layout you call.

This topic is 8076 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.