Help Desk

Error class for required fields

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?

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?

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.

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.

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.