The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Is there global setting or hook for setting "Allow front-end editing of entries" for all forms
I have a bunch of forms for which I would like to set "Allow front-end editing of entries". Is there a way to globally set or add a hook which will auto set "Allow front-end editing of entries" everytime a new form is created and also apply to existing forms.
September 19, 2017 at 6:16 am
As far as I know, there isn't any WordPress hook that will allow you to change the value of the checkbox. You could do this in jQuery. The following code will check the box:
jQuery('#editable').prop('checked',true)
Of course it's a little more complicated than one line of code. You have to create a script that is loaded in the WordPress admin and also test that you are on the right page just in case there's another field out there with the same ID. This will work on new forms that you are creating.
For forms already created, you can do this with SQL. The editable field is located in wp_frm_forms table. For each form you want to make editable, you have change this value to 1. A sample SQL script for a single form is:
UPDATE `wordpress`.`wp_frm_forms` SET `editable`='1' WHERE `id`='80';
For multiple forms in the same SQL statement, use:
UPDATE `wordpress`.`wp_frm_forms` SET `editable`='1' WHERE `id` IN ('80', '81', '82',);
Discussion closed.