Skip Navigation

[Resolved] Add custom fields to user forms

This support ticket is created 6 years, 1 month 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)

This topic contains 7 replies, has 2 voices.

Last updated by Luo Yang 6 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1167655

Hi,
I am creating a signup/user form following your tutorials. I have created some custom fields to extend user's info and inserted them in the form. The form shows up WP fields correctly only (name, email, etc) but it doesn't render my custom fields. Custom fields are added as:
[types field='MyFieldName'][/types]

but WP fields are added as:
[cred_field field="user_email" class="form-control" output="bootstrap"]

Like this custom fields won't show up. I tried to change the custom field syntax to [cred_field field="MyFieldName" class="form-control" output="bootstrap"]
but I get an error.
What's the right sintax to add and display my custom field in the form ? Unfortunately in your docs (https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-registering-users/) custom fields are not shown.
Thanks
Regards
Nicola

#1168380

Dear Nicola,

How do you setup those custom fields? are they custom user fields or custom post fields ?
In you case, you need to setup them as custom user fields, see our document:
https://toolset.com/documentation/user-guides/user-fields/

Then you can display them as fields in Toolset form for creating user.

And to avoid mistake, I suggest you try with button "Auto-generate form content" to generate the form content and shortocdes:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-registering-users/

#1168915

Hi Luo Yang,
Many thanks for your support, I actually created custom post field instead of user field ... I am still learning .... I have deleted the old group and started recreating user fields with the same name and everything of the old ones, but when I try to save I get the msg that the slug is already in use. It looks like the slug is still in the db even though I have deleted the old fields. Do you know how to delete the old slugs so that I can use the same slugs for the new user fields ? thanks
Kind regards
Nicola

#1169343

You can remove those old fields by this:
Dashboard-> Toolset-> Custom Fields
click button "Post Field Control", find those specific custom post fields, and "Delete"

#1169445

Hi Luo Yang,
I did delete all post fields already (deleted the entire group), and if I go to Post Field Control they do not exist anymore. But if I try to use one of those deleted fields slug for a new user field I get the error that that "slug is in use already". It looks like slug remain in the db even after field deletion. Is this a toolset bug ? or a WP bug ? One example: I created a post field called PIVA (slug piva) and deleted as you suggested in order to recreate PIVA as user field. If I try to recreate it as a new user field I got the message that "piva is in use already". Of course I can use a different slug name for the new field, just trying to understand what's wrong here.
Thanks
Regards
Nicola

#1169453

Dear Nicola,

There isn't similar problem in my localhost, it works just fine after delete in "Post Field Control" window.
Please check these:
1) You are using the latest version of Toolset plugins
2) check if the field slug "piva" is in custom user fields control or custom terms fields
3) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again

#1169465

Hi Luo Yang,
thanks for your prompt reply, my answers below:
1. yes
2. checked, no
3. unfortunately I don't have much time for deep investigation now, This doesn't seem to be showstopper for my project, I will use different slugs and go on.
Thanks
Regards
Nicola

#1169473

OK, please let me know if you need more assistance for it, and feel free to create new ticket if there is any new problem. thanks