V
V
vikholodov2018-02-20 19:34:14
WordPress
vikholodov, 2018-02-20 19:34:14

How to add classes and attributes to acf_form form fields?

You need to add posts to the custom post type on the frontend. I created fields through ACF, used the acf_form function, but I don’t understand how I can manage field classes and attributes

<?php acf_form(array(
          'post_id'		=> 'new_post',
          'new_post'		=> array(
            'post_type'		=> 'comment_akcii',
            'post_status'		=> 'draft'
          ),
          'submit_value'		=> 'Отправить комментарий'
        )); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-02-20
@vikholodov

Here, at least 2 options:
- either wrap the fields in some div block and add a class to it.
- or add a class through the screen admin
panel - https://screenshots.firefox.com/66FddgVoGrDSA2nW/m...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question