Skip Navigation

[Resolved] Opening Days and Hours in the Registration Form for Ads & gallery upload.

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

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1202040

Tell us what you are trying to do?
#1 - I'm trying to create a user registration form where they input their working days and hours. I have seen this video explaining about repeatable field groups (hidden link) but it means that I will have to add the working hours myself and not the user.

How can I create a registration form that they choose from a dropdown menu the days and hours and display in the form and eventually on their Ad?

#2 - Same thing with images. There is the feature image but I want the user to be able to upload 6 pictures which will be in their Ad gallery. I would like it to be in the registration form as well.

Thank you in advance!

#1202334

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Based on your requirements, unfortunately it is not possible out of the box, at this moment. There are a few things to consider in this regard:

- Since you want Ads (consider it a post type) to link with User Registration (form), it requires quite a complex workflow. Generally, with Toolset, you can not mix Post Types and Users (as well as their custom fields).

- Post types, however, offer Repeatable Field Groups (RFG), which can be used to repeat a whole group of fields. But for your particular workflow, it does not fits as well. Since RFG itself isn't repeatable (as a whole group), you will need to submit the form each time to post an entry (which is of course not the intended or a pleasant experience).

- For drop down menu (i.e. selecting from a predefined list of items), you can use Select field to offer work days and hours. But this is another blocker that Select fields are not repeatable.

- You can use a repeatable Image field to allow the user to upload multiple images on a user form. But again, there are two caveats to this: 1) you will not be able to link these fields with Ads post type; 2) User forms do not offer RFGs.

Provided the above circumstances, this complex workflow requires custom PHP programming, as well as, the good knowledge of Toolset API (specially for Forms when saving or handling). This also requires to draft your forms in Expert or HTML mode (i.e. typing and adjusting form scaffold manually). Please have a look at https://toolset.com/documentation/programmer-reference/cred-api/, if it may interest you.

I've discussed the matter with our development team and fortunately some of these are already in planning. It may take some time to properly develop and rollout such features. And may not be available anytime soon.

I hope you can understand the complexity of the matter. Should you have any question, please feel free to discuss.

Thank you and have a nice day!

#1202361

Thanks Waqas,

I was under the impression that Toolset would have been the plugin I needed in order to create a Classified Ad site, like the one you guys have for Classic Cars. But no Classified Ad site has only one image to show in their Ads.

With that said, I have two options:
1) Ask for a refund, since Toolset does not fulfill what I thought it would.

2) You can tell me what is the best (current) way to implement the features I need. For example, for Opening Hours, what is the best way to put it in the form for user registration? Also for pictures inside the Ad?

Thank you and I hope you understand my concerns!

#1202517

I had to re-read what you wrote and let me see if I understood.

For the Working Hours, you suggest having a custom type Select and repeat it 7 times (Mon-Sun) and for the hours, instead of having 24 selects for the hours and mins, I could put a single line for hours (where the user could input their hour) and select for minutes (since I will give them 4 options, 00, 15, 30 and 45 OR single line for minutes as well) and repeat it 7 times.

I believe that's the only way to have it in the form and they would be able to change it later on by logging in. Am I correct?

Now for the images, you suggest to just duplicate the image field 6 times, so it can show in the form, am I correct?

Looking forward to your reply!

#1202839

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, what I meant is that you can use:

- either Repeating fields (https://toolset.com/documentation/user-guides/repeating-fields/ - except Select field)
- or can create number of fields for your purpose

Repeating fields are quite useful when you want to input several instances of a single type of content. For example, the additional Ad images, can benefit from a repeating Image field.

You can use repeating fields for your other purpose too, but as I mentioned previously, that Select field isn't repeatable, this will not benefit you much out of the box. However Single Line field can be set as repeatable. You can have a single line field to take all the input (i.e. Monday 09:00am to 05:30pm), but of course this isn't an ideal experience. The reason why I don't recommend repeating fields here is that your input forms a group of controls (i.e. Day + Hour + Minutes). Repeating fields are good for only 1 kind of input type.

For a grouped (or mixed) types of input, Types offers Repeating Fields Groups (https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/). RFGs require some understanding and depend on how you want to use it on frontend.

As another idea, you can create a separate form for user to take Work Days/Hours input and can use Types Relationships to link those with the Ad or whatever they relate to. It's possible to achieve all this on front-end as well, but the workflow is different. You need to create two different forms, one for adding the advertisement and one for selecting the days and times (RFG items):

1. create the "parent" post for the advertisement
2. in a different form, add the RFG item and choose the advertisement as a parent (or, there should be a link to add a RFG item from the page with the advertisement form, which will have the advertisement pre-selected)

In my previous message, all I had the impression of a more interactive experience, which definitely requires a complex flow. But from your later messages, I think you can achieve it by following the above mentioned guides.

I recommend looking at following guides also:
- https://toolset.com/documentation/user-guides/using-custom-fields/
- https://toolset.com/documentation/post-relationships/
- https://toolset.com/documentation/user-guides/types-custom-fields-conditional-display/
- https://toolset.com/documentation/user-guides/front-end-forms/

Please feel free to discuss anything related, thanks.

#1203190

Thank you for reply. I will read what you sent carefully. I'm still trying to get my head around some concepts and terminologies. This is still pretty new to me.

But for you to have an understanding what I want to accomplish, this is the website we currently own hidden link

We are a hub for professionals in the massage niche. Any massage professional can create an Ad (paid, there are no free Ads) and put their information on our site. At this moment, we do not want to use an online payment system, therefore, we have to approve the Ads manually.

We are currently doing everything manually and saw the opportunity to use Toolset to automate some things and to give the advertisers access to their own Ads.

But there are some things we have to approve first, for example, the pictures. We do not allow naked pictures and neither group pictures in one Ad. The Ad is for individual use only. Therefore when an advertiser wants to update their pictures, they
send us the pictures and we need to crop 300 x 300 for the profile picture (for round effect), and size it down some pictures to 700px width. Sometimes they want to add promotions or change their working hours, etc.

By using Toolset, we figured that we could create a registration form where they would input all the information, such as:
- Their name (Post Name) [Also tricky because if they choose category "Terapeuta" they need to put their real name, while in "Massagista" they can put a fake name]
- Pictures (up to 6 total, 3 by themselves and 3 doing massage on someone) [Has to be approved by us]
- Location
- Phone number
- Cel number
- Whatsapp number (by clicking, it would take them to whatsapp web with a pre-written message with the Advertiser`s name on it) *we have that on our site
- Website (only for clients with multiple ads)
- If they accept credit/debit cards
- Text of what they do
- Promotions (sometimes they want to add that to attract clients)
- List of Massages that they do
- Working hours
- Map if they want to show it

Here is an example of the Ad: hidden link

I'm not sure it's possible to have EVERYTHING automated. But some things would be nice to have it done with Toolset. And I would like your expertise opinion on it.

One thing I'm sure we can do with Toolset is to have a custom search. On the current website, we have too many pages to show the Ads, Terapeuta, Massagista, Clinicas, and within them there are sub-posts. I will be creating one page, where the visitor can choose what he wants to see, then he can narrow done by location, section (terapeutas, massagista, etc), maybe by style of massage, promotions and if accept cards or not. By the way, can the results in the custom search have round pictures like this one: hidden link

Don't get me wrong, I totally understand how complex this project is but it would be worth it because we are looking to expand, not only in our city, but in other cities as well, therefore we need something more automated.

Well, I'm off to read what you sent and try to implement it. If there is anything else you can suggest, I would appreciate it!

Thank you and looking forward to your reply.

#1203556

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello again,

I understand what you explained in detail above. You can do all this with the Toolset, given that you understand how Toolset works. My previous statement about the complexity of the project was almost around it and I tried clarifying that where you can mix things easily and where it may be a difficulty (for which you may need to go extra miles).

Anyhow, let me first briefly describe what each plugin in the Toolset is for:

Types:
- Custom Post Types (i.e. Ads),
- Post Custom Fields (i.e. Additional information of an Ad other than Title and Descriptive content),
- Post Custom Taxonomies (i.e. Ad or Service Type; like Therapist, Massager or etc),
- Post Relationships (i.e. Ad has more related offers)
- User Custom Fields (i.e. Photos, Contact Info and etc)

Forms:
- User Forms (i.e. Registering and editing user profile)
- Post Forms (i.e. Creating and editing Ads and their related posts like offers)

Views:
- Powerful search based on the above mentioned (i.e. Searching ads by keywords, or by ad or service type and so on)
- Creating content templates to present things on frontend

Layouts:
- Combining all above to design a whole or part of a page

These are very basic points to understand how you can engage them for your project.

Now as of your project, I 'll suggest:
- for a user account or profile related thing, you should use User Custom Fields. For example location, cell number, whatsapp or anything related.
- for an Ad or Service, use Custom Post Types, Post Custom Fields and Post Custom Taxonomies.

There are some areas which may confuse you when normalizing your data. For example, this Ad (hidden link) on your site, apparently looks like a user profile. While, at the same time, it is a service or some kind of personal advertisement as well. You can use User Custom Fields to cater all this information, then can use a View to present this stuff on the front. For your user to be able to edit all this information, you can use Forms as well.

However, for those particular complex fields (i.e. Work Hours), the idea is still the same. If you are putting everything on a User profile and using User Custom Fields, then you will have to add as many fields as needed for Work Days/Hours section. While, for Photos you can use an Image Field and make it repeatable. A repeatable field allows the user to add as many instances as she wants. And later you can pick the right ones and remove the unwanted instances.

The same thing if you divide between User Profile and Post Types, you can offer your users to keep contact information separate than what an Ad or Service can offer. This way, each Ad or Service can have its own Work/Day Hours and Photos. The idea for additional Custom Fields (Post and User) is also the same here. But gives an extra benefit of using Repeatable Fields Groups. Remember RFGs are only supported in Posts so far?

Using an RFG, you can offer your users to add Work/Day hours as many times as they want. Since there are only 7 working days, I am sure no one would go beyond that ? Or may it enable your users to have different schedules in alternative weeks.

Then finally, use Views (a very powerful tool) to present things on frontend. For example, if you have divided things into User Profile and Post Types, you can use different views on a single page to format an overall presentation.

Toolset documentation and guides (https://toolset.com/documentation/) have so much to offer. All you need to get your head around WordPress system and how you can give spins to the Toolset.

I also recommend going through the Getting Started guides (https://toolset.com/documentation/getting-started-with-toolset/) and play with the sample/example sites (i.e. Classifieds).

Have a nice day ?

#1203968
Login form 3.jpg
Login form 2.jpg
Login form 1.jpg

Thank you for your reply. I'll read what you wrote carefully and try to implement it. But one thing at a time.

I am using Elementor Pro to do the editing of the site and Toolset for its functionalities.

I'm having an issue creating a Login popup. I have created a User form named Login and added to the popup from Elementor. First I added a placeholder on both User and Password but they do not show. And I changed the value of the submit button to Login, which did not change.

I attached the pictures.

First of all, am I doing the correct form? I believe for a login form, we use User form, right? What am I doing wrong that this is not working?

#1204131

As I was reading your previous post, I think I understood a little bit more. Please correct me if I'm wrong but I should create a Post Type named Clients (User custom field) and another named Ads (Post custom field) and use the post relationship to connect them. Because one Client can have many Ads, it would be one-to-many relationship.

In the User Field Group, I would include:
- Full name
- E-mail Address
- Phone numbers
- Location (or address)
- Website
- Google Map
- Images (Both feature and gallery)

In the Post Field Group, I would include:
- Therapist or Massager
- Types of Massages
- Text description of what they do (post content)
- Working Hours

Then connect them with Post Relationship. Am I on the right path?

#1204217

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Please consider followings regarding your both messages.

Login Form
Although this is kind of a user related form but is a special one in the WP system. In Toolset this is part of Toolset Views, which offers to display the standard Login Form. Please see https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-login-form for the details. On the other hand, if at places you see "Fields and Views" button (in an editor), you can find it in the "Password Management" section.

There are a few more standard forms, like Forgot Password and Reset Password.

Other
There's a difference between User and Post custom fields. User fields are attached with user accounts while Post fields are attached with the Post Types. So apparently, you will add User Custom Fields to User accounts, while creating a new Post Type for Ads and then attaching Post Custom Fields to it.

Your fields distribution in their respective groups is correct, but Users and Post can not have relations in between. Only post types can have relations with each other.

So practically, you will create:
- a User Form to allow non-logged-in users to register (User Forms -> Create new user)
- a User Form for logged-in user to edit it's profile (User Forms -> Edit existing user)
- a Post Form to create an Ad (Post Forms -> Add new content)
- a Post Form to edit the Ad (Post Forms -> Edit existing content)
- a Post View to list logged-in user's Ads, with clickable link to the page containing the Post Form to edit the Ad

Views plugin offers to query for the content based on several parameters. This particular guide (https://toolset.com/documentation/user-guides/filtering-views-query-by-author/) shows how you can grab posts for currently logged-in user.

#1205538

Thanks Waqas for your great support so far.

I read what you wrote and I'm starting to understand it better. I also tried out a couple of things and one thing that I did not like is that creating an User, it places their information in the User section on the WP dashboard. I wanted to be able to put all the information of the client in one section (for example, I create a Custom Type named Clients and have everything of them in there) but apparently this is not how WP works. Therefore, I was thinking on just leaving the User section with the least information possible, maybe just their email and password.

The reason is because I also have clients who own a clinic and they have like 30+ therapists, therefore, I need to think of them as well. It would probably not be ideal if he had to create 30+ Users for his therapists. One User account and then he can add Ads for each one. So am I correct to just have the least information on the User section and the rest of the information on the Custom Post Type named Ads?

Thanks in advance for your help! Looking forward to your answers!

#1205574

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, that's the way. Keep minimal information with user account, like user name, password, email and any relevant information with particular to that user account. Rest of the information should go under the Ad, since an Ad may have its own parameters or types of information (i.e. title, description, contact person, venue and etc).

And you are right that Ads will be the custom post type.

#1205607

Great! I will consider this threat resolved. I'll try a couple of things and if I have any more questions, I'll create a new one!

Thanks Waqas for all your help!

#1205608

My issue is resolved now. Thank you!