Different required fields for different services

I have two services, and appointments are made for them on two separate pages, with the service-filtered schedules and obviously no dropdown.

For one of them, I need a phone number. For the other, I don’t, and don’t want to require it. Is there a way to set it up to do that in the appointment confirmation shortcode or elsewhere?

  • PC
    • WPMU DEV Initiate

    Hello Lauren,

    Greetings and thanks for your post.

    That is something which is hard coded in the plugin files. There is not conditional rule defined in it which makes the fields required or not required according to the services.

    Either its required or not at all required. So in short there is no out of he box way to achieve that.

    If you are looking to achieve that kind of functionality, that will have to be custom coded into the plugin. You can post a job requirement here : https://premium.wpmudev.org/wpmu-jobs/

    Alternatively, you can use WordPress multisite and have 2 different sites and 2 different installs of the A+ plugin and have them configured separately. The only challenge in this situation will be that you will get duplicate appointments if the service provider is the same for both services.

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers

    PC

  • Lauren Sell
    • WPMU DEV Initiate

    Well yeah, I knew there was no front-end setting to do so. Was just hoping I’d missed some adjustment in the shortcode that would make it show up or go away in certain cases when globally set otherwise, or it was a simple bit of code I could patch in myself.

    There’s definitely no budget for hiring someone else to do anything, and I’m not going to enable multisite for one gorram phone number field.

    If nothing else, I’ll use and rename the notes field so it’s not required, hide it with CSS on the page that doesn’t need it, and just hope everyone follows instructions on the page where it really should be required…

  • PC
    • WPMU DEV Initiate

    Hello Lauren,

    I couldn’t agree more with you on your comments.

    If nothing else, I’ll use and rename the notes field so it’s not required, hide it with CSS on the page that doesn’t need it, and just hope everyone follows instructions on the page where it really should be required…

    That is gonna be the best thing to do. You would just need to be more careful in writing the instructions.

    Also, if you are going to rename the notes field, the best way to do it is using the Ultimate Branding plugin and activate the text change addon using which you can search replace the text.

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers

    PC

  • Lauren Sell
    • WPMU DEV Initiate

    Yeah, there’s only the two services, each of which has exactly one page with the description and they set their appointment right below that, so only one instance to change! No need for the Ultimate Branding plugin on this site. :slight_smile: I’ll certainly keep it in mind for future projects though.

  • Craig Grella
    • Recruit

    I had a similar question to Lauren’s.

    It might be more trouble than what it’s worth (in terms of a feature request) but it would be cool to be able to choose the confirmation fields on a per service level. That is, confirmation fields for service A might be different from service B, especially if those services are offered by different providers who might need different info for that associated service.

    With that said, and looking at the code for appointments.php – i could see how that might take some serious work though.

  • PC
    • WPMU DEV Initiate

    Hey Craig,

    Good to see you :slight_smile:

    Thanks for chiming in. That is a very valid feature request and is worth creating a thread in “Features and Feedback” section.

    Different services might have different requirements so something like “Override Global settings” should be nice to have.

    However there was nothing else discussed on this thread, I have moved it to the right section :slight_smile:

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.