Error class for required fields

Home Forums Calendar Products Community Events Error class for required fields

  • This topic has 5 replies, 2 voices, and was last updated 6 years ago by gobanana.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1470247
    gobanana
    Participant

    I am using my own edit-events.php file just to modify the layout of the submission page. However, the error classes do not work if I use my own label fields (or without any). Can you please advise how to have the required fields receive an error class upon validation?

    #1471303
    Sky
    Keymaster

    Hi Anna!

    The validation script is tied to the information in the fields, so modifying them may prevent the script from working, and would require custom js to re-implement. This level of customization is unfortunately a bit outside of our Scope of Support.

    You can read more about customizing the Event templates on our Themer’s Guide.

    Is it possible for you to modify the layout without changing the fields/labels? Maybe just focus on the container elements?

    Let me know if this helps.

    Thanks,
    Sky

    #1471304
    gobanana
    Participant

    Thanks for the reply Sky.

    I’m trying to avoid clunky CSS to override existing styles of the plugin and use form styles already implemented in my form.

    Can you elaborate on what you mean by “tied to the information in the fields”? Maybe I can set up my new fields to have the same information. Ultimately all I need to do is remove labels, containers, and assign a few extra classes to the input fields themselves.

    #1472323
    Sky
    Keymaster

    Anna,

    To elaborate, I mean that there isn’t a generic class you can add to your own markup that will make any field you create just work. You will need to maintain the id, classes and other attributes for the javascript to keep working with those fields. You could probably add some CSS classes to the fields for custom styling purposes, but they will need the original data.

    The label and field markup is generated via a few php functions which have filters which may be used for customization. You could use these filters, or, you could copy the markup the php generates and add your own classes to that. Again, this type of customization is outside of our scope of support. If you are an experienced PHP developer, it is certainly possible to customize. Otherwise, dealing with some clunky CSS may be easier.

    Good luck! Let us know if you have any other questions.

    Thanks,
    Sky

    #1491848
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Error class for required fields’ is closed to new replies.