I have a PHP script: where the entry in for A is copied and an entry is created in form B. This action SHOULD occur only if the checkbox is ticked.
The checkbox function appears not to be working: A copy is created in Form B when the checkbox is not ticked
I attach the script.
David
Rob,Thanks for your prompt reply. Hope this is what you want.https://paste2.org/swg1O04YRegardsDavid
What is the value of "$checkbox_value" after the FrmEntryMeta::get_entry_meta_by_field call?
Profuse apologies, the checkbox field is '1'
Then your code is doing what it's supposed to. If the field value is 1 then it doesn't satisfy the if statement, thus it doesn't return and creates the entry. if (empty($checkbox_value) || $checkbox_value != '1')
Please login or Register to submit your answer
Staff replied 6 months ago
The script doesn't appear to be attached. I recommend using a code paste site, such as paste2.org, to share code because it's easier than this format to format the code and share it with others.