Home › Forums › Front-end Issues › Replacing frontend form html › Reply To: Replacing frontend form html
I’ve tried to play around with:
function my_acf_render_field( $field ) {
echo 'test';
}
// Apply to all fields.
add_action('acf/render_field', 'my_acf_render_field', 5);
// Apply to image fields.
// add_action('acf/render_field/type=image', 'my_acf_render_field');
// Apply to fields named "hero_text".
// add_action('acf/render_field/name=hero_text', 'my_acf_render_field');
// Apply to field with key "field_123abcf".
// add_action('acf/render_field/key=field_123abcf', 'my_acf_render_field');
and your example does have some effect but only adds html before (or after) the regular html…
NOTE: I can’t just rewrite the whole html output because I have some select fields that are flexible populated.
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.