As I ponder about the best course of action. I created this flowchart and I was wondering if that's the best route for this challenge. If so, then I will need some guidance on how to setup if the user chooses manager.
Things I need to create:
1) User form with an additional custom field (individual or manager)
2) Three forms (one for Therapist, one for Clinic and one for the Relationship form) OR do I have to create four forms (one for individual Therapist, one for manager Therapist, one for Clinic and one for the Relationship form)?
3) My account page with a conditional statement that will show/hide forms. If the user chooses individual then show only Therapist form. If the user chooses manager then first show Clinic form then Therapist form (or do I show relationship form, that's where I'm stuck)
If you could tell me the best course of action that will not impede speed and performance of the site, I would appreciate!
Thanks!
Hello,
In my opinion, you can try these:
1) Setup two different user role:
- individual(manage his own Therapist post)
- manager(manage his own Clinic and Therapist posts)
https://toolset.com/course-lesson/setting-up-custom-roles-for-members/
https://toolset.com/course-lesson/setting-access-control/
2) Setup two different user forms for different user roles to register in your website
3) In the "My account" page, check current logged-in user role, and display different content templates:
A) Content template for manager user, display:
- A post view, list his own "Clinic" posts,
https://toolset.com/forums/topic/filtering-views-query-by-author-for-a-profile-page/
- A post form for creating new "Clinic" post
- A post view, list his own "Therapist" posts,
- A post form for creating new "Therapist" post
In the single "Clinic" post, display:
- the editing "Clinic" post form link,
https://toolset.com/course-lesson/front-end-forms-for-editing-content/
- display the relationship form to related it with other "Therapist" post
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/
B) Content template for individual user, display:
- A post view, list his own "Therapist" posts,
- A post form for creating new "Therapist" post
In the single "Therapist" post, display the editing "Therapist" post form link,
For your reference.
Luo, I will try your suggestion next week and get back to you on that. Thank you and happy new year!
Happy new year, please update here if you still need assistance for it, thanks
Ok Luo,
I created:
- the 2 custom roles (individual and gerente)
- I created 2 User forms for above
- I created a Clinic Type (Clínica) with almost all the same fields as the Therapist Type (Anúncios) using the same previously created custom fields.
- I created a Relationship Form (Clínica-Anúncios)
- I created 2 Post forms for Clinic and Therapist
As I was testing I noticed that on the Therapist Form I was able to see that I could choose a Clinic. So I created a demo Clinic to see if the form would work, but I was expecting the custom fields that are similar for both (phone numbers, location, etc) to be filled or to not be available since it's already in the Clinic form.
What am I doing wrong? Or do I have to create ANOTHER Therapist Post Form with only a title, images, and the relationship choice (Clinic-Therapist)?
Are you going to setup different phone numbers and location values for each "Clinic" post and "Therapist" post?
If you are, you will need to add the those phone numbers and location custom fields into both "Clinic" post form and "Therapist" post form
Please confirm it first.
Are you going to setup different phone numbers and location values for each "Clinic" post and "Therapist" post?
If my client owns a Clinic, then I want all the information from that Clinic to be shown in the Therapist Post. In this case, the phone number, location will be the same. So no, they will not be different.
BUT
If my client is an individual, she/he has no Clinic to be associated with, they are independent and they need to add their own phone number and location. This client will not even know a Clinic Form exist.
I don't think Toolset has a way to filter that. I'm thinking I will have to create an individual Therapist Form and another Therapist Form just for clients with Clinics. Am I correct?
Yes, you are correct.
Two post forms for creating new "Therapist" post:
- One for individual users
- One for manager users
Luo,
Now this is where I am a bit stuck. I am using Elementor Pro for the design of the single.php post for Therapist. Toolset's gallery image is just ugly and I will not be using, thus, Elementor it is.
How can I build a template that would show the information for Independent Therapist and for Therapist that are associated with the Clinic?
Currently I'm using shortcode to include the fields because they have additional function, such as click to call on phones and click to chat on whatsapp. (Attached image)
Toolset offers no conditional function (Attached image) in order to differentiate between Independent Therapist and Clinic Therapist information.
So, how do I setup the single.php page that will show the correct information?
You can use Toolset Access shortcode [toolset_access] to display different contents on different user roles.
For example, only "Administrator" and "Author" users can see the content:
[toolset_access role="Administrator,Author" operator="allow"]
some other shortcodes here
[/toolset_access]
Luo I think we are having a "Lost in Translation" kind of communication.
My previous post was about creating a single.php file to show my visitors (everyone who sees the website) the information about the post.
What you suggestion is good for back end (my clients, the users, to see and edit their information).
So in the front-end (for everyone to see, the visitors of the website), how can I create a template that will show the post information?
Do I have to create 2 templates? One for individual therapist and another for therapist who are associated with a clinic?
Is it even possible to have 2 templates for single.php?
No, the shortcode [toolset_access] ... [/toolset_access] works in frontend.
As I mentioned above, you just need one content template, in this content template, display three [toolset_access] shortcodes, each of them display different contents for different user roles:
- individual
- manager
- Guest