I’m using ACF with WordPress. ACF Version 4.3.6 and WordPress Version 3.8.2.
I made a plugin that allows users to create a specific kind of post from front end.
I followed that tutorial http://www.advancedcustomfields.com/resources/how-to/create-a-front-end-form/ and it works very well. When the form is submitted, the data are inserted in the data base.
Unfortunatly, I have a problem with the style and that kinds of elements. I set the form to use tabs fields but they doesn’t appear at all in the front end. All the fields are displayed vertically.
I compared the HTML in the back end and in the front end and it seems that, in the front end, some tags are missing.
For example, in back end, I have something like this :
<div class="acf-tab-wrap"> <ul class="hl clearfix acf-tab-group"> <li class="active"> <a class="acf-tab-button" data-key="field_53372d4adc0e0" href="#">Informations basique</a> </li> <li class=""> </ul> </div>
Here some screenshots :
I’m trying to generate a very large page form on a front end page for users to create pages. I’m having the same problem with the Tabs I have inside the post.
The tabs work fine on the back end but on my front end the Tabs weren’t working. I found several people on-line with the same problems so I thought I’d dig a bit deeper as they have all been ignored from what I have seen.
I have on my page about 25 fields, some with conditional logic, some google mas and Relationship fields. After creating a test field group and adding one by one it seems that including a Relationship field breaks the tab functionality on the front end. Here is the code I’m using (I’m working in the page-new-template.php file and not in a template).
<?php acf_form_head(); ?>
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if( !is_user_logged_in() ): ?>
<h1>Please Login or Register</h1>
<?php else: ?>
<h1>Step 2: Build your page</h1>
‘post_id’ => ‘new’,
//’field_groups’ => array( 26 ),
‘field_groups’ => array( 167 ),
‘submit_value’ => ‘Finish’
<?php endif; ?>
<?php endwhile; ?>
<?php get_footer(); ?>
And I’m running the following versions:
ACF flexible content field 1.1.1
ACF Gallery field 1.1.1
ACF Options page 1.2.0
ACF Repeater field 1.11
For now I’m trying to rebuild my page field groups to exclude the relationships, but it is taking a lot of screwing about unfortunately.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.