Support

Account

Home Forums Add-ons Flexible Content Field Nested Flexible Content Field?

Solving

Nested Flexible Content Field?

  • I just google around the site and see that some old version of ACF have this feature (nested Flexible Content Field).

    http://support.advancedcustomfields.com/forums/topic/flexible-content-within-flexible-content-within-flexible-content/#post-3468
    As you mention, it make interface hard to use. But I’m sure that someone that use this feature get familar with complicate code already.

    It very useful for some content type. How can I bring it back?

    Thanks

  • Hi, I need this feature too, I need to place an input field in the radio button choices.

  • Yes. Please! This would definitely a killerfeature for me!

    And btw: There is a bug: I can’t choose a Flexible Content Field inside a Flexible Content Field. That’s right. But I can choose a Flexible Content Field inside a Repeater Field inside a Flexible Content Field. But it doesn’t work and destroys my fields.

  • Same like Philipp Kuehn here, my code:

    if (have_rows('content-formular')):
                        while (have_rows('content-formular')) : the_row();
                            if (get_row_layout() == 'content'):
                                ?>
                                <img id="image2" style="float:<?php the_sub_field('imageposition'); ?>;" src="<?php echo wp_get_attachment_url(get_sub_field('image2')); ?>" />
                                <div class="subhead" style="margin-<?php the_sub_field('imageposition'); ?>: 51%;"><h2><?php the_sub_field('subheadline'); ?></h2></div>
                                <div id="text" style="margin-<?php the_sub_field('imageposition'); ?>: 51%;"><?php the_sub_field('text'); ?></div>
                                <div class="clearfix"></div>
                                <?php
                            elseif (get_row_layout() == 'form'):
                                if (have_rows('formfelder')):
                                    while (have_rows('formfelder')): the_row();
                                        if (have_rows('innerform')):
                                            echo 'pups';
                                            while (have_rows('innerform')): the_row();
                                                ?> 
                                                <form method="post" action="#">
                                                    <?php
                                                    if (get_row_layout() == 'name'):
                                                        ?> 
                                                        <label for="name">Vor- und Nachname</label>
                                                        <input type="text" name="name" />
                                                        <?php
                                                    elseif (get_row_layout() == 'e-mail'):
                                                        ?> 
                                                        <label for="email">E-Mail-Adresse</label>
                                                        <input type="text" name="email" />
                                                        <?php
                                                    elseif (get_row_layout() == 'code'):
                                                        ?> 
                                                        <label for="code">Code</label>
                                                        <input type="text" name="code" />
                                                        <?php
                                                    elseif (get_row_layout() == 'street'):
                                                        ?> 
                                                        <label for="street">Straße und Hausnr.</label>
                                                        <input type="text" name="street" />
                                                        <?php
                                                    elseif (get_row_layout() == 'zip'):
                                                        ?> 
                                                        <label for="zip">PLZ</label>
                                                        <input type="text" name="zip" />
                                                        <?php
                                                    elseif (get_row_layout() == 'city'):
                                                        ?> 
                                                        <label for="city">Wohnort</label>
                                                        <input type="text" name="city" />
                                                        <?php
                                                    endif;
                                                    ?> 
                                                </form>
                                                <?php
                                            endwhile;
                                        endif;
                                    endwhile;
                                endif;
                                ?>
    
                                <?php
                            endif;
                        endwhile;
                    endif;
                    ?>

    I’m not sure if the code helpes, otherwise just ignore it. The form isn’t even displayed.

    My Site: http://dev.scavi-ray.npire.de/

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Nested Flexible Content Field?’ is closed to new replies.