Title: Save draft bug &#8211; visibility conditional with checkboxes
Last modified: September 8, 2022

---

# Save draft bug – visibility conditional with checkboxes

 *  Resolved [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/)
 * Hi,
    I’m having another problem with the “save draft” feature. It seems that 
   it doesn’t save fields that have the visibility condition dependant on a checkbox.
   For example, I have a checkbox with the option “yes”, then a field (any field)
   that has the visibility condition: _Show this field if all of the following rules
   match: checkbox is yes.
 * The condition works and the field is displayed upon checking the checkbox, but
   the contents of field are simply not saved, which is a problem. If I remove the
   condition, everything saves normally.
 * It seems the problem is just with checkboxes – it works as expected with radio
   buttons.
 * Please have a look at this – it throws a wrench into the whole project. Some 
   workaround, perhaps?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [Jair – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport15/)
 * (@wpmudevsupport15)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/#post-15991427)
 * Hi [@pemptus](https://wordpress.org/support/users/pemptus/),
 * I hope you are doing well today!
 * Please share the link where the form is and also an export of the form with us,
   so that we can check further.
 * You can find more info on how to export the form here : [https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export](https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export)
 * After exporting, please share the code using a service such as [https://pastebin.com](https://pastebin.com)
   which is free to use.
 * Please always make sure to use such service to share the code and don’t post 
   the code here directly as it will most likely be unusable.`
 * Kind regards,
    Zafer
 *  Thread Starter [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/#post-15992429)
 * Hi [@wpmudevsupport15](https://wordpress.org/support/users/wpmudevsupport15/),
   
   I can’t exactly share the link, since I’m doing the testing on localhost. I did
   just test it out on a server, though, so the problem’s universal. I quickly whipped
   up this form: [https://pastebin.com/dkeZe5ZD](https://pastebin.com/dkeZe5ZD) –
   put it in, try to write something in the text field and see if it gets saved 
   when “save as draft” is used. You can exchange the text field for any other field.
 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/#post-15996011)
 * Hello [@pemptus](https://wordpress.org/support/users/pemptus/)
 * I was able to replicate the same with the free v.1.17.2, while the latest pro
   v.1.18, which will also be released soon here in the free version, fixes the 
   issue.
 * I pinged our developers in case there’s any workaround we could provide meanwhile.
   🙂
 * Thank you,
    Dimitris
 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/#post-15997523)
 * Hello [@pemptus](https://wordpress.org/support/users/pemptus/)
 * As mentioned before, this is a confirmed issue that will be fixed in the upcoming
   v.1.18. Meanwhile, you can try to change the checkbox option values to small 
   case letters and then re-select visibility conditions in all the dependent fields
   because checkbox values are changed now. Or you can edit the **library/abstracts/
   abstract-class-field.php** plugin file and around line 1012, replace
    `if ( is_string(
   $form_field_value ) ) {` with
 *     ```
       if ( is_array( $form_field_value ) ) {
       	$form_field_value = array_map( 'strtolower', $form_field_value );
       } else if ( is_string( $form_field_value ) ) {
       ```
   
 * Please first try this in a staging/testing site.
 * Thank you,
    Dimitris
 *  Thread Starter [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/#post-15997532)
 * Hi,
    Good stuff, thanks. The file modification works, as does just using lower
   case letters for the checkbox. Glad to hear it’s getting a proper fix soon.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Save draft bug – visibility conditional with checkboxes’ is closed to
new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Pemptus](https://wordpress.org/support/users/pemptus/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/save-draft-bug-visibility-conditional-with-checkboxes/#post-15997532)
 * Status: resolved