WordPress.org

Ready to get started?Download WordPress

Forums

Simple Fields
[resolved] Only first letter is displayed from repeatable fields (5 posts)

  1. Sprutt
    Member
    Posted 10 months ago #

    Hi and thanks for a great plugin!

    I'm making a listing of software for my portfolio and I'm using a single repeatable textfield, and add another item for each software. It's all working fine except from the fact that it's only echoing the first letter in each item.

    What's even more odd is that I'm using an identical setup for another listing on the very same page, and that reads out fine.

    My embed code looks like this:

    <?php
    $software_values = simple_fields_values("software_ex");
    foreach ($software_values as $values) { ?>
       <div class="about-info-software"><?php echo $values["software_ex"] ?></div>
    <?php } ?>

    I bet it's something simple, but I would love some help!

    http://wordpress.org/extend/plugins/simple-fields/

  2. Pär Thernström
    Member
    Plugin Author

    Posted 10 months ago #

    sounds very strange indeed. what about do you get if you in the look write

    print_r( $values );

    ?

  3. Sprutt
    Member
    Posted 10 months ago #

    Tackar!

    That resolves the problem, thanks alot!

    May I as a PHP newbie ask what the difference between the two is?

  4. GrindPress
    Member
    Posted 8 months ago #

    I am an having identical issue where I have multiple field groups on one page, but for some reason, this one with the same code only outputs the first character:

    <?php
    $repeatable_field_values = simple_fields_values("sport_text");
    foreach ($repeatable_field_values as $values) { 
    
    print_r( $values["sport_text"] );
    }
    ?>

    This only outputs the "b" in basketball.

    Any help is appreciated.

  5. GrindPress
    Member
    Posted 8 months ago #

    Nevermind, I fixed two seconds after i posted my question...

    needed to just do this:

    echo $values;

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.