Skip Navigation

[Resolved] User Login / Registration form with some Conditional Output

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

Our next available supporter will start replying to tickets in about 0.83 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/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by Luo Yang 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#893217
formular_birkenhof.jpg

Hi Nigel,
on the old (actual) site ob "Birkenhof" the User has to fill out a PDF (see Attachment) if he wants to book a trip for a christian freetime week (or weekend) and send it manually by E-Mail to the corresponding staff member of "Birkenhof". On the new site (besides the the traffic light system) there should also be the possibility, that if the User wants to book a freetime trip he should have the option whether to enter his data (address etc -> see attached PDF) manually in a (booking) form every time again or to register once and for the next time his address data is prefilled in the book. Is this possible with Toolset?
I guess I have to use Toolset Access and CRED? Now, as you can see in the attached PDG on the left site (sorry, only german) you can choose the different freetime trips from a dropdown. On the right side in the PDF you can see some options. Some of the options have blue and orange numbers. So for some freetime trips from the dropdown on the left side there are some options only available to choose from on the right side. Is it possible with a custom post type and conditional output that for some trips (for example 6144, 6166, 6164 etc.) from the left side in the dropdown, the options on the right sid "Kinderbetreuung erwünscht", "Anreise am Freitag zum Abendbrot" and "Eigenes Einkommen" only appear if the User choose the corresponding freetime trip where those options are possible?
Also I thought it would be nice that if the User logs in, he see an overview about his booked trips. Is it possible that the User has the option to cancel the booking trip that this trip will be deleted from his site with Toolset? Also the User should have the option to change/update his address if he is logged in. Is this also possible?
I hope it sounds not too complicated.
Thanks
Thorsten

#895257
delete.JPG

Dear Thorsten,

Q1) Is this possible with Toolset?
I assume you are going to let your user to fill the forms with wordpress webpages, and submit the data to your webserver.
Yes, It is possible with Toolset, I suggest you try to setup the post types as below:
Parent post type "Trips"
-- Child post type "Booking trip"
https://toolset.com/documentation/user-guides/creating-post-type-relationships/

Q2) Is it possible with a custom post type and conditional output that for some trips
CRED plugin supports "Conditional Display for Form Inputs", see our document:
https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/
This means that some sections can display or hide, based on the values of custom fields and taxonomy inputs.

Q3) option to cancel the booking trip that this trip will be deleted from his site with Toolset?
Yes, if you are going to delete the "booking trip" posts from your website, you can setup CRED links for deleting posts, see screenshot delete.JPG
More help:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_delete_post_link

Q4) Also the User should have the option to change/update his address if he is logged in. Is this also possible?
Yes, it is possible. You can try this:
1) Create a view to list "booking trip" posts, filter by the post author is current login user:
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
and display CRED form links for editing post:
https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/

then user will be able to edit the post fields, update the address

#897646

Dear Luo,
thanks for the answer. At the moment I don't understand why I should use a Parent Post Type "Trips" and a Child Post Type "Booking trips". I think I didn't understand it. In the backend the staff member or myself should be able to set the trips with the trips description and the traffic light. That is, what it looks like on the old site:
hidden link
Red is if it booked out, yellow if there are only few free places left and green if there are enough places left. Please take also a look into this thread with Nigel:
https://toolset.com/forums/topic/need-a-special-view-using-a-traffic-light-system/
https://toolset.com/forums/topic/traffic-light-system-2/
From my understanding I should use a Custom Post Type "Trips" with the custom fields (traffic light system, description/details of the corresponding trip -> thats what you see when you click on one of the events on hidden link). In the details screen of each trip I will post a link to the registration form (CRED??), where the user can fill in his data like in the PDF (see my original post of this thread) and he should be asked if he wants to register so for the next time he logs in, his registered data should be prefilled in the form (with CRED??). The registered user should also see his booked trips and should be able to delete a trip and also change/update his adress data ( (see original post). At the moment i can only see one Post Type:

  • "Trips" with custom fileds for traffic light etc.
  • A Custom Post Type for the Registration part??

Sorry, that i don't see the whole picture at the moment. Maybe you can help me to see it clearer. 🙂

Thanks
Thorsten

#900217

It depends on yourself, if you need to add/edit/delete the "Booking trip" information, as I mentioned above, you can setup a custom post type "Booking trip" as child post type of "trip", see my answer above:
https://toolset.com/forums/topic/user-login-registration-form-with-some-conditional-output/#post-895257

if you need the guest user to be a registered, you can setup a CRED form for creating user, see our document:
https://toolset.com/documentation/user-guides/cred-user-forms/

In my opinion, the workflow is below:
1) Guest visits a single "trip" post,

2) He can register as a WordPress user (CRED form for creating user), fill the user's information

3) Then he can login your website, create new "Booking trip" posts(CRED form for creating child "Booking trip" post),
Here you can use's custom field value as default value
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
Argument: value. Optional. Preset value

#906032

If the user register on the page and he logs in into his account, can I build in the functionality that the user can update his address data? If yes, will this be realized bith Toolset Forms? Also is the the possibility, that if a user updates his address data, that some team stuff and / or the administrator of the Website will be informed for example via eMail about the change?

Thanks
Thorsten

#906050

Q1) If the user register on the page and he logs in into his account, can I build in the functionality that the user can update his address data?
Yes, it can be realized with Toolset Forms, you just need to setup a CRED form for editing user, users can use it to update their custom user fields, see our document:
https://toolset.com/documentation/user-guides/cred-user-forms/

Q2) some team stuff and / or the administrator of the Website will be informed for example via eMail about the change?
Yes, it is possible, you can send the email notification when user update their account with CRED form:
https://toolset.com/documentation/user-guides/cred-user-forms-email-notifications/

#909413

Hi Luo,
I have to make a Custom Post Type out of the "formular_birkenhof.jpg" attached on the top of this site. I will call this Custom Post Type "Registration Form". The form is based on the input of the team stuff member in the Custom Post Type in the backend, because not all things are needed for all events. How can I create a user-form for the front-end-user, which is based on the input of the team stuff member in the Custom Post Type in the backend?
This is the site with the overview of all events this year: hidden link
If you click on one of these events, for example: hidden link
As you can see, this site shows the event details. The form should be integrated right under "Veranstaltungsort".
Another question: Should I make two Custom Post Types? One for the events with the event details and infos and one for the formular creation itself, which I called "Registration Form" as mentioned above?
And how can I display only the overview (hidden link) with the traffic lights? Is it possible to do this out of the events Custom Post Type?
Thanks
Thorsten

#909704

Q1) How can I create a user-form for the front-end-user, which is based on the input of the team stuff member in the Custom Post Type in the backend?

I assume we are talking about this:
Each team stuff member can create a different single "Registration Form" post, Toolset form use data from "Registration Form" post the generate a different Toolset form, setup different post fields in it.

If it is, unfortunately, there isn't such a built-in feature within Toolset plugins, but if you agree, we can take it as a feature request.

But you can use CRED form to create/edit wordpress post/page or wordpress user.
if it is for creating/editing wordpress post, please refer to this document:
https://toolset.com/documentation/user-guides/creating-cred-forms/

If it is for creating/editing wordpress user, please refer to this document:
https://toolset.com/documentation/user-guides/cred-user-forms/

Q1) Should I make two Custom Post Types?
In your case, you can make only one single post type, and add custom fields in to it, see our document:
https://toolset.com/documentation/user-guides/using-custom-fields/

#911217
CustomForm.jpg

I'am not sure if I understood your sentence (Each team stuff member can create a different single "Registration Form" post, Toolset form use data from "Registration Form" post the generate a different Toolset form, setup different post fields in it.).
What I mean is similiar to your video (hidden link). The team member (it is only one team member who is responsible for this) has a Custom Post Type 'events", which I created with toolset. In this CPT are the details for the event and also the different things for the form. Attached you can find a picture what the team member needs in the registration form for the event(s). As you can see in the picture, there are data, which should always contain in the form and other data, which should only contained, if it is needed for an event (for example a children bed is not needed for every event or an instrument for a music event etc.).
I hope that I explained it good enough.
Thanks
Thorsten

#911712

You screenshot is not in English, it does not help.

And the video you mentioned above, is for displaying the Tooslet post form in a layout: Post Form Cell
https://toolset.com/documentation/user-guides/cred-form-cell/

1) For the problem you mentioned above "registration form for the event",
as I mentioned above, you can setup two post types
1) Events
2) registrations
Setup one to many relationship between "Events" and "Registrations"
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

Create a Toolset form for creating "Registrations" posts
https://toolset.com/documentation/user-guides/creating-cred-forms/
and display it in the under "Veranstaltungsort":
hidden link

Then in a single "Event" post, you can setup a view to query all related "Registrations" posts:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

For each wordpress user, you can setup a view to list all "Registrations" post created by current user:
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/

2) In your screenshot, there is a block "Data, which are individual from event to event",
I assume we are talking about this problem:
For each "Event" post, the form fields are different, each form contains different fields.

If it is, then you will need to setup different Toolset form for each "Event" post. Hope it is clear.