Skip Navigation

[Resolved] Clear fields input based on conditional display in 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.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Author
Posts
#406972

Hi There,

We want to reach the next thing:

- We have 2 options (by radio fields): option 1 / option 2.
- Choosing a option triggers 2 fields by conditional display (cred)
(option 1 - field A & field B / option 2 - field C & field D)

Is it possible to delete the input which is given after selecting a option,
when the user later on decides to select the other option (in the cred form to create the content or in a later stadium when using the cred edit form?

Hope i made it clear as described.
Otherwise please let me know.

Thanks

Paul

#407326

Dear Paul,

Are we talking about this case:
User select option 1 of the radio field, fill some value into field A & field B, then select option 2 of the radio field, are you going to clear the values in field A & field B?
If it is, I don't think it is necessary, when user select option 2 of the radio field, CRED form will disable the field A & field B, both fields will not be submit to your webserver.

If you still need to clear the values of field A & field B, you will need create some custom JS codes, for example, you can trigger a function when the radio field value is changed, then clear the fields values.
See jquery documents:
hidden link
hidden link

#411955

I will give it a try.

The problem is we have a basic product and a premium product (monthly payment).
We don't want the product to indexed as premium when it's moved back to basic.

Is there another method to make this hapen?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.