Home › Forums › Front-end Issues › Replacing frontend form html › Reply To: Replacing frontend form html
There isn’t any way to replace the HTML structure of acf_form(). All of the JavaScript associated is dependent on what ACF creates. There is also not a way to add classes to individual parts of the field, only to the field wrapper div in PHP.
There are some choices
1) Add custom CSS that mimics the CSS used in your framework that targets the parts
/* label */
.acf-field .acf-label label {
/* css for label here */
}
/* input or change for other types of fields */
.acf-field .acf-input .input {
/* css for input here */
}
2) Add custom JavaScript that adds classes to elements https://www.advancedcustomfields.com/resources/javascript-api/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.