Skip Navigation

[Assigned] Remove fields from prefilled form using Toolset Forms shortcode

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 4 replies, has 1 voice.

Last updated by jefM 1 hour, 9 minutes ago.

Assisted by: Minesh.

Author
Posts
#2842850

Hi,

I created a front-end form using Toolset Forms. I prefill this form with content from the previous entry using the 'post="x"' in the shortcode. Like so: [cred_form form="x" post="x"].

This works, but since some information will certainly be different I would like to prevent certain custom fields from prefilling if you will. How would I be able to achieve this?

Would this be achievable using the Forms API hooks?

Thanks in advance,
Niek

#2843170

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand - do you have Toolset post edit form or add form?

Can you please share problem URL and admin access details and tell me for what fields you want to display/change or you do not want to appy the default value?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2843344

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing admin access details but when I try to login using the admin access details you shared, I get the following error message:

Error: The username Toolset is not registered on this site. If you are unsure of your username, try your email address instead.

Can you please send me working admin access details.

I have set the next reply to private which means only you and I have access to it.

#2843381

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've switched your form mode to Expert mode:
=> hidden link

And added the following code to display your desired field ""wpcf-inschrijving-gewenste-oppervlakte":

[cred_generic_field type='textfield' field='wpcf-inschrijving-gewenste-oppervlakte']{
            "default":"",
            "persist": 1
        }[/cred_generic_field]

You can use the above method for textfield (singlel-line) fields. If you have any other field type like checkboxes etc.. then we may hve to follow bit different method in order to save the checkboxes field selected option values.

#2843383

Hi Minesh,

Great, that seemed to have done the trick! I actually had to change "default':''' to "default:" " (add a blank space), otherwise it kept the original value.

Could you please advice for the dropdown and select too, because I will actually need those.

Thanks again.
Niek