Enhanced Message Field – How to target field within repeatable field
-
I am using option pages to show my repeatable fields.
I have an enhanced message field as a sub field in my repeatable field
I am using the following code:add_action('acf/render_field/name=enhancedfield', 'acf_enhancedfield'); function acf_enhancedfield(){ $rows = get_field('repeater_field_name'); $row_count = count($rows); //Total count of repeatable fields $i = 0 //Target First repeatable array echo $rows[ $i ]['sub_field_name']; //content to show in Enhanced Field of just the first... }
Now the issue is, the content renders within the second repeatable field as well.
How can I have it to just show in its respected enhanced fields within its repeatable fields?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Enhanced Message Field – How to target field within repeatable field’ is closed to new replies.