Support

Account

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.