Skip Navigation

[Resolved] More than one user forms, each has to be different, don't show the same required

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.

Our next available supporter will start replying to tickets in about 8.54 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 9 months ago.

Assisted by: Waqar.

Author
Posts
#2682850

Hi,

I creating a website for a coaching, familysettings, coaching education company. They want to registrer their clients with more than the basic information. Each event also has his own questionnaire. Than the coach/trainer will also add user information about the coaching sessions and some very personal questions.

When a client wants to attend a coaching session they have to register thru the website. This is (register) form 1 (This information can be edited thru login and there I created an editing form.) Than 2 weeks before they attend this session they will be asked to fill in a questionnaire, (editing) form 2. When they have the intake session they will, together with the coach, fill in a very personal questionnaire, (editing) form 3. The coach is also filling in sessions reports, but this is done thru a own developed plugin.

My problem is that when I want to use required fields in form 1(name, address, phone, email etc) they always come up on the other forms too. I can't delete them because they have the lock on them hidden link.

-How can I use required fields on form 1 and not show them on form 2, form 3 etc?
-What to do with the username, password, email etc fields hidden link. I now set them to auto generate on all forms.
-Do I always have to translate all message files? Isn't there a way of placing a .po and .mo in languages?
-I will be using Woocommerce for payment. How can I use the right user info in checkout? Now the address fields are not assigning to billing fields. I have created new fields in Toolset.

Thanks for the support in advance!

Cheers
Marco

#2683137

Hi Marco,

Thank you for contacting us and I'd be happy to assist.

> How can I use required fields on form 1 and not show them on form 2, form 3 etc?

- As you observed, when a user custom field is set as required through the field settings, it can't be dropped from any user form.

To achieve what you're planning, you can set all those user fields as 'not required'.

Then in any particular form where you have to make them required, you can include custom JS script to make them required, selectively.

> What to do with the username, password, email etc fields hidden link. I now set them to auto generate on all forms.

- If you don't want these 3 user fields to appear in the user edit form, you can just keep their respective checkboxes checked for autogeneration.

If unchecked, those fields will also appear in the edit form, available for editing. The exception is a 'username' field, which will be read-only, as it can't be changed.

> Do I always have to translate all message files? Isn't there a way of placing a .po and .mo in languages?
- To globally translate the form messages, you can use the 'wp-cred.po' file available at the folder:
/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/locale/orig/

> I will be using Woocommerce for payment. How can I use the right user info in checkout? Now the address fields are not assigning to billing fields. I have created new fields in Toolset.

- The WooCommerce plugin stores the address field data in its custom fields, which can't be directly linked with the user fields added through the Toolset Types.

If you don't want to store the addresses in duplicated/repeated fields, you can remove them from Toolset user fields. Next, you can use the field slugs used by WooCommerce address fields, in generic fields in Toolset user forms, so that the data is stored in the same fields.

Here is a thread with the details of an example usage with a similar requirement:
https://toolset.com/forums/topic/woocommerce-fields-in-user-form/

I hope these points will help and let me know if you have any follow-up questions.

For future reference, we encourage creating a separate ticket for each question or concern, for the most efficient support.

regards,
Waqar

#2683763

Hi Waqar,
Thanks for that! Solved a lot for me. Just one question:

>To globally translate the form messages, you can use the 'wp-cred.po' file available at the folder:
/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/locale/orig/
-Where to place the .po and .mo files? Iplaced them in locale but I am not seeing anything changing in my forms. Will it pick it up only with new forms?

#2684064

Thanks for writing back.

> Iplaced them in locale but I am not seeing anything changing in my forms. Will it pick it up only with new forms?

- I've performed some tests and yes, the form message translations are picked up at the time of form creation, so they will be picked up for new forms that you'll create.
( once the form has been saved, it picks the texts of the messages that are saved in the form settings, available at the bottom of the form edit screen )