• Resolved liquid8

    (@liquid8)


    Hi, I am trying to create a two column layout with this plugin.
    I have added fields like this:

    (Column 6/12)
    Text field
    (Column 6/12)
    Text field
    (Column Endpoint)
    And multiple ACF field after this

    I am showing the form with acf_form() -function. After adding those columns there are no changes on the front end form. Also I can’t see any columns added to the source code. What am I missing here?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    Sorry for the late answer, I’m kinda busy with the upcoming patch lately.

    I just tested it and it works fine on my end. Here is the video of my test.

    If you’re using the native ACF Form feature, I would recommend to make sure that you correctly enqueued ACF JS/CSS using acf_form_head(). See documentation.

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter liquid8

    (@liquid8)

    Hi, thanks for the reply.
    For me it looks like I have the same kind of setup but for some reason it doesn’t work. I made a video also, please see it here

    Thread Starter liquid8

    (@liquid8)

    Hi, one more thing: I just noticed that the plugin is adding those columns on backend. So if I open the post on the admin side, then the columns are there. But the frontend is not showing them.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Sorry for the late answer, I’m kinda busy with the upcoming patch lately.

    This is really weird. In the video you posted, the main <div class="acf-fields acf-form-fields -top"> should also have the class acfe-column-wrapper too. See video demo.

    I would recommend to check your browser console (F12 on chrome), see if you don’t have any JS error, since columns are setup in javascript.

    To make sure you don’t have any custom code that would interfere, I would recommend to setup a clean WP install with ACF Pro + ACF Extended only, and test the feature on it. If you prefer to keep your installation, then try to disable all your plugins one-by-one (at the exception of ACF Pro & ACF Extended) until you find which one cause the issue.

    If the problem persists, I would suggest switch to the native WP Twenty Twenty Two theme, to make sure you don’t have any custom code in your theme that would break the feature.

    In order to test it on a clean install:

    Here is the Field Group json export of my video test, so you can import it with the “ACF > Tools” admin page.

    Here is a simple code you can add to a page-acf-form.php in your theme. Then simply publish a page called “ACF Form”, and visit it. You should have the same result as me.

    <?php
    acf_form_head();
    get_header();
    ?>
    
    <?php if(have_posts()): ?>
        <?php while(have_posts()): the_post(); ?>
    
            <h1><?php the_title(); ?></h1>
            
            <?php
            acf_form(array(
                'field_groups' => array('group_638bbe4a53af7')
            ));
            ?>
        
        <?php endwhile; ?>
    <?php endif; ?>
    
    <?php get_footer(); ?>

    Let me know if you found something.

    Have a nice day!

    Regards.

    Thread Starter liquid8

    (@liquid8)

    Hi!

    Thank you for the ideas, with the help of those I found out that the problem occures when I give the fields for the acf_form() -function. So because I have this:

    $all_fields = array(
    ‘raaka_aine_nimi’,
    ‘post_title’,
    ‘raaka_aineen_tuotenumero’,
    ‘valmistaja’);

    $options = array(
    ‘fields’ => $all_fields,
    ‘submit_value’ => ‘Save changes’
    );

    acf_form($options);

    That causes the columns not to show. But if I just use the plain acf_form(), then the columns are visible. Is there any fix to this / should the function behave like that?

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Well, yes this is the expected behavior since you explicitly tell ACF to only display specific fields, which doesn’t include the columns.

    In order to display them, you’ll have to add the columns field keys in your list.

    In the ACF Form demo I shared above, the code would be:

    acf_form(array(
        'fields' => array(
            'field_638bbe4a10660', // column
            'field_638bbe5310661', // textarea
            'field_638bbe5e10663', // column
            'field_638bbe5810662', // textarea (2)
        )
    ));

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter liquid8

    (@liquid8)

    Aa, of course! Thank you for the help.

    Cheers,
    Janne

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Columns not shown on front end’ is closed to new replies.