April 25, 200421 yr 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
April 27, 200421 yr 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
May 11, 200619 yr 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
Create an account or sign in to comment