[Closed] How do you remove parent via a cred form ?
This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to use a cred form to edit an existing post. This post has a parent attached to it that I want to remove, so that it has no parent.
I hide this field on the form so the user can not see the drop down selection. The only thing they see is the submit button.
My problem is it will not accept any value to remove it. I have tried a space ..... no space......0...... and even [wpv-post-id], but still no change. (Note: all these values work on the cred preview but not live)
Hi, nothing to do with me but I had this error earlier today... I found another support forum saying there was an error when trying to set a default value to '0'.
The solution was to use JQuery to update the value (this worked for me). In the javascript box below the CRED form paste the following:
I copied and pasted the code in the javascript box on the cred edit form and it made no difference to my results. It still keeps the original value. The only way to change it is to show the list of parents and select no parent. Am I missing something or should I change something in the code ? Is the no parent value 0 ? Why is it not working only on an edit form, when a create form works perfect ?
I'm not able to see the issue. It seems to me like a caching issue where the form changes are not being saved. Rather they are being saved but not reflecting when viewing the post.
Could you provide me with the debug information on the website so that I can have a look at it ?
I'll enable the special fields for the debug information.
OK here is hopefully a better explanation of the problem.
This is what I'm doing -
I have a CPT with custom fields and I have created a CRED EDIT form. This form only has a few fields on it that will be hidden using css, so the only thing visible will be the Submit Button. The field values will be auto filled by setting default values in the coding of the CRED form "value".
This is what it should do -
CRED Version 1.6 worked perfect as it changed the old value to the new default value.
This is what is happening now -
In CRED Version 1.7 & 1.7.1 ..... The new default value is only being saved if there was no previous value for that field. If there was a previous value, it does not change at all, when it should, as the default value should override any previous value.
This is a VERY SERIOUS problem as the form submissions are not updating the values correctly or at all. I have tested this on select fields, single line fields and Parents, and all have the same problem. I trust that you can resolve this soon. Thanks.