Require event start date not working

Home Forums Calendar Products Community Events Require event start date not working

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1118828
    Jesse Simmers
    Participant

    I used this page to setup my required fields but start date doesn’t seem to notice if the field is empty when submitted.
    https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/

    I need this field required because people are forgetting to enter their event date. By default it uses todays date and if they forget to change the date their event gets submitted with todays date which is no good. I removed the value that was populating todays date so the field is now empty but the validation does not work.

    To make sure it wasn’t my value modification causing the issue I put all the original code back with todays date as the value and clicked in the field and backspaced the date out so the field was empty and still didn’t get a notification the field was required.

    #1119213
    Hunter
    Moderator

    Hello Jesse,

    Welcome back!

    ​We cannot help with custom coding, so unfortunately you will have to take the reins on this.​ Please read this page for more information: https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/

    Please note, however, that if you use this code verbatim it won’t do anything – it simply illustrates the basic process and you would of course need to amend the initial test condition and error message.

    I’d like to at least try and help you get going in the right direction, though, so if you don’t mind, can you specify how you implemented this customization? If possible, please copy and paste your ​unedited​ custom code into a Gist at http://gist.github.com, and then share a link to that Gist with me here.

    Thank you for understanding and have a good rest of your Thursday.

    #1119230
    Jesse Simmers
    Participant

    Copying and pasting the first function provided on that page DOES work for all the fields I need without customization with the exception of the start and end date. I am using the following and it works just fine with the exception of the event start and end date. The page mentions certain fields can’t be required using the above approach but the date fields are not included.

    https://gist.github.com/jcsimmers/bcaf70274ad2bf3b8dfad03d158aeac3

    #1119864
    Hunter
    Moderator

    Thanks for the response,

    I understand the majority of the filters do work ‘out-of-the-box’, so the start date field should work as it’s not mentioned in the fields that can’t be marked as required; but the customization you’re seeking is beyond simply marking the start date as “required”.

    Please send over that gist as mentioned in my previous response and we’d be glad to take a look. Thanks and let me know if anything I’ve said needs clarity. Have a good weekend 🙂

    #1119887
    Jesse Simmers
    Participant

    Thanks for the response!

    With or without my customization it does not work so lets completely disregard my customization and see if we can get it working. I agree the date required should work out of the box without other customization but it does not, at least for me.

    Here is a scenario…. Lets say I have a completely unmodified submission form. The only customization is the function in my previous post (the out of the box one for required fields). In theory all fields mentioned in my function should be required and throw an error if those fields are empty when the form is submitted.

    If I scroll to the bottom of the form and click submit I get a message that says all of those fields are required but it does not say start and end date are required. This is most likely because those fields are not empty. So I go ahead and remove all text from the date fields and click submit but still no required message regarding dates.

    There is no customization outside of the documentation in this scenario so my thoughts are that if the date required message is not coming up at all then it’s a bug. If it’s not a bug then the documentation is incorrect.

    Are you able to trigger the date required message in a test environment on your end?

    #1120514
    Hunter
    Moderator

    Hey and welcome back,

    I tested how you described and indeed, no error was displayed after I deleted the start date from the event submission form. It turns out the datepicker fields ​are​ exceptions and that’s because the datepicker code tries to ensure they are populated with a value (defaulting to today’s date) as soon as the form is submitted. We’ll update the knowledgebase post, but I’m afraid working around this would be a customization you’d need to drive forward by yourself._

    I wish I had a better answer, but one other recommendation I have would be to check out this list of available developers for hire. Good luck and thank you for your understanding.

    #1126794
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Require event start date not working’ is closed to new replies.