Lock form fields during post edit
Author | Posts |
---|---|
March 1, 2014 at 12:30 am 15957 | |
Mahi | Hi, Is it possible to lock specific form fields during post editing (via a frontend form)? If so, how? So, when the edit button is clicked and the user is taken to the WP Frontend form, certain form fields can't be changed. Thanks! |
March 1, 2014 at 1:41 am 15958 | |
ProUser | I’m thinking I can edit the appropriate plugin file (whichever one is building the form to be edited). I can use an if statement to determine if the logged in user is the post author and, if not, make certain fields readonly. But which file and where in that file should I place the code? |
March 1, 2014 at 3:49 am 15964 | |
ProUser | Great! I think this may help me with a hack I’m needing. But where does the code posted by Tareq go, exactly…. from http://wedevs.com/support/topic/hide-fields-in-edit-form/#post-6918 function wpufe_assign_new_form( $post_id, $form_id ) { This solution will allow me to create a second form with all the fields hidden as needed, leaving only the editable field displayed. But where do I put it? Thanks! |
March 1, 2014 at 10:43 am 15980 | |
Mahi | it goes to your theme’s function.php file |