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.

Search form: Conditional display in popup

Featured Replies

  • Newbies

Hello, I need to make a search form on the web with 2 related popup in which the displayed values change in the second popup according to the value selected in the 1st popup. Very easy in filemaker with relationships but can't do it with using standard CDML.

Here is my code looking for the values in the corresponding field in FM. The 1st, <segment> is OK but the second <sub_segment> remains empty. It is this one in FM who display only values related to segment:

<SELECT NAME="Segment" style="border-style: solid; border-width: 1; background-color: #FFFFFF; color: #000000; font-family: Verdana; font-size: 10 px; font-weight: normal" class="hand"> [FMP-valuelist:Segment, list=SegmentList] <OPTION> [FMP-ValueListItem] [/FMP-valuelist]

</select>

&nbsp;

<SELECT NAME="Subsegment" style="border-style: solid; border-width: 1; background-color: #FFFFFF; color: #000000; font-family: Verdana; font-size: 10 px; font-weight: normal" class="hand"> [FMP-valuelist:Sub_segment, list=SubsegmentList] <OPTION> [FMP-ValueListItem] [/FMP-valuelist]

</select>

I know it's possible to do this with javascript but the content of <segment> and <sub_segment> will be updated frequently on FM side.

Does anyone face this problem ?

Are both of these ValueLists applied on the Layout you are using for the CDML?

All the best.

Garry

Hi, you can't do this direct on one page because for the conditional list to work, you need to post an action back to the database.

A true Filemaker conditional value list doesn't work over the web.

I've only found a work-round for this, which involves 'digging down'

We have an image library where the input is up to four levels of conditional value list: section, category, sub-category, sub-sub category - though this may be only one or two of these.

I have a separate database which has one record of each combination and the 'searching' is actually handled by this. When it reaches the 'bottom' level for any section, it passes the search string to the real database and returns the records. This isn't like real conditional value lists and it needs a click at each level, but because the user gets changing choices and then the results, it looks fine on screen. i used this rather than java because there are around 500 records in the 'subcategories' file.

Sorry, kinda hard to describe, but I could mail you a url and password to see it working.

i guess if you have to use a workround, make it look like a feature!

regards, Jeff

  • Author
  • Newbies

Yes Garry, they are. I think the difficulty is that as FM display the content of subsegment dynamically. On the HTML form, when the user select a value in the 1st popup (segment), nothing is sent to FM and the second popup (subsegment) remains desperately empty!

Thanks, Stephane

I've written one which used a lot of Javascript. It preloaded all of the data; about 600 records which was a problem for older browsers.

All the best.

Garry

  • Newbies

I have successfully created two drop down fields on my web page using the information contained in the following techinfo paper at

www.filemaker.com/ti/105336.html

It is done entirely in CDML. I had to create two new files in my solution. "Category1.fp5" which contains a single record for each of the category names in the first drop down (e.g "Stationery" and "Brochures")and a second file "Category2.fp5" which contains one instance of each of the possible results in the second drop down (i.e. it has two fields this time. e.g

"Stationery" and "Letterhead"

"Stationery" and "Folders"

"Stationery" and "Note Pads")

As in the article I have a portal on the web layout in each of these files.

Users when selecting say "Letterheads" in the second category then get presented with a list of all the products which have the combination of Stationery and Letterhead.

You can view a demo of my site at www.estock.co.nz

User Name "225"

Password "Don"

Feel free to order items and see how it works - this site only has sample data

Hope this helps.

Ross Pedder

The pop-ups are loading quite quickly.

Generally, the decision has to be made whether to load all conditional data first, or to make database calls for each level of pop-up. This two-level one works very well.

All the best.

Garry

  • 5 months later...

The solution presented by Filemaker (www.filemaker.com/ti/105336.html) doesn't work as it's based on a portal for the second value list and it will sort repeated values for the first choice. How to allow a portal to filter unique values? another problem... probably you can't do it without user intervention.

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.