I have created custom field type following this documentation https://www.advancedcustomfields.com/resources/creating-a-new-field-type/ and I have below fields:
- YouTube ID(input type text)
- Submit Button(input type submit)
- Title(input type text)
- Description(input type text)
- Thumbnail URL(input type text)
- Upload Date(input type text)
- Duration minute(input type number)
- Duration seconds(input type number)
I have saw this question, Advanced Custom Fields – Custom Field Type with multiple inputs and ACF: Creating Custom Field Type store two values. I am expecting that I could do it this way when setting the fields.
<input type="text"
name="<?php echo esc_attr($field['name']['youtube-id'])?>"
value="<?php echo esc_attr($field['value']['youtube-id'])?>"
/>
<input type="text"
name="<?php echo esc_attr($field['name']['youtube-title'])?>"
value="<?php echo esc_attr($field['value']['youtube-title'])?>"
/>
...