Skip 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.

Submitting Checkboxes to an FMP file via FX

Featured Replies

I have an FMP file with a field with a checkbox attached and data entered (i.e. Interests).

Using FX, I can take the querried results, explode it, and have multiple checkboxes appear checked on an edit Form.

However, I cannot resubmit the results to the FMP file, even if I don't change the data. I am able to implode it prior to sending it back, creating a single-line string (i.e. hiking, math, swimming), but then the checkboxes don't work on that end.

Does anyone know the code I would need to reorganize the data prior to using FMEdit() to submit the results to the file?

Thanks, as always.

DSW

  • Newbies

A couple of things (my apologies if you're already doing these...):

* Use the empty bracket syntax -- "[]" -- on the PHP side to automagically create an array from the submitted check boxes.

* When you implode the resulting array to submit it to FileMaker, make sure that you using the newline character -- "n" -- to separate the items, since this is how they're separated in FileMaker.

HTH

  • 2 years later...

I can't get this to work for me. I can explode the field using explode("n", $Field) and then use in_array() to display the checkboxes, with the proper checkboxes checked. OK, so far.

But, if I then subsequently use implode("n", $Field) before submitting it back to the database, I get a PHP bad argument warning for the implode() function and $Field in the database becomes blank.

If I do not use Field[] to collect the checkbox values and do not use implode, then only the last checked value gets submitted to the database

So, what am I doing wrong? It seems it should work, but it doesn't.

Thanks

William

Try:

urlencode(implode("n",$Field));

Good Luck.

Garry

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.