Skip Navigation

[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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 14 replies, has 3 voices.

Last updated by Shane 7 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#412477

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)

[credform class='cred-form cred-keep-original']
[cred_field field='form_messages' value='']
<div class="hide">
[cred_field field='_wpcf_belongs_mens_id' value='0']
</div>
[cred_field field='form_submit' value='False' urlparam='']
[/credform]

#412488

I have done some more testing and it appears that VALUE does not work when you are editing a post , put it works fine to create a new post.

#412534

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jane,

Thank you for contacting our support forum.

Is it that you want to remove the parent information from the post ?

Meaning that when you edit a post you want the ability for the post not to have a parent ?

Please let me know.
Thanks,
Shane

#412548

Correct.

But as i said if i set a "VALUE" to any field on a EDIT POST .... it does not show up. The original "VALUE" always shows up.

[cred_field field='_wpcf_belongs_mens_id' value='0']

#412553

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:

jQuery(document).ready(function($){
mynumid = jQuery('input[name="wpcf_belongs_mens_id"]').attr('id');
$("#"+mynumid).val('0');
});

Hope that helps... it worked for me.

#413030

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tristian,

Thanks for contributing to our forum post 🙂

@jane have you tried the solution that Tristian suggested ?

Please let me know if it helps.
Thanks,
Shane

#413104

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 ?

#413131

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jane,

Would you mind allowing me to have admin access to the website ?

The private fields will be enabled for your next post.

Also please provide me with a link to the page with the edit form.

Thanks,
Shane

#413840

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jane,

I'm having a few issues with the website.

I keep getting blocked so its slowing down my progress 🙁

Would you mind temporarily disabling the plugin that does this so I can have an uninterrupted look ?

Thanks,
Shane

#413844

all fixed. try again

#413849

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jane,

Seeing that their are so many forms 🙁 i'm not able to pinpoint which one is causing the issue.

Could you send me a link to a post that has an edit form on it so that I can have a look ?

Thanks,
Shane

#413850

Follow the instructions when you log in ... it will give you the links.

#414228

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jane,

I must apologize for the delayed response 🙁

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.

Please follow the instructions in the link below
https://toolset.com/faq/provide-debug-information-faster-support/

Looking forward to hearing from you soon.

Thanks,
Shane

#414728

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.

#415497

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jane,

This issue has been mentioned to our developers.

In the mean time I would suggest remaining on version 1.6 as their aren't any major improvements made in 1.7

Hopefully this issue will be resolved by our development team.

Thanks,
Shane

The topic ‘[Closed] How do you remove parent via a cred form ?’ is closed to new replies.