Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Conditional menus with javascript

Featured Replies

With the help of Beverly Voth, from Moonbow Software I could finally draw two drop down conditional menus using javascript to call a source document wit the arrays previously created. Now I can see the "makes" and "models" in the search form with the other CDML search tags but when I submit the selected values FMP ignores the "makes and models" selected options.

How can I point the selected values in the javascript menus to the correspondent field in the DB?

Thank you

MyForm.jpg

Do you have the correct field names within the<select> tags; e.g.:

<select name="make">

   <option value="">Select Make</option>

[FMP-ValueList....etc

</select>

<select name="model">

<option value="">Select Model</option>

...etc

All the best.

Garry

  • Author

Yes, I think so for the rest of CDML tags as they work correctly... but the javascript external menus doesn

I notice that on the page listing the two select lists are named; "motor" and "clase". The Javascript listing calls them; "Marca" and "Modelo".

You can change the names within the Javascript.

All the best.

Garry

  • Author

Well, actually you can't view the javascript menus code because they are created when the page is loaded. The "motor" and "clase" are complementary options in the search form and work fine... I send you the javascript embeded document. Put it in the first level of the web folder. The correspondent field in the database should be "modelo" or "texto final", it is indiferent.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.