• Resolved brianreilly75

    (@brianreilly75)


    Hi,
    I’ve been using the plugin and got it working great in the WP backend but I’m now trying to display on the front and having issues.

    I have a pod called work_order and another called work_order_content (Advanced Content Type with repeatable fields).

    I’m trying to display a form to create new work orders and it is displaying post fields properly but the repeater field has ‘Please save the parent first to add work order content’. I believe this is done but can’t get it to show the field.

    Also, when I’m trying to display a single work order on a page using a Pods template it’s coming back blank from this:

    print_r( pods_field(‘work_order’, $post->ID, ‘work_order_content’) );

    I’ve also tried a standard template and no luck:

    {@work_order_product}<br>
    {@work_order_product_quantity}<br>

    I’d appreciate if you could point me in the right direction where I’m going wrong.

    Thanks in advance.

    • This topic was modified 2 years, 9 months ago by brianreilly75.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Coding Panda

    (@codingpanda)

    Hi @brianreilly75

    Thanks for using the plugin.

    It requires a parent ID to display the repeater field. Is your code like this:

    $pod = pods( 'work_order', 20 ); //20 is an ID.
    echo $pod->form( array(  ), 'Save ' );

    By the way, for security reasons, only logged-in users and access a repeater field, and you need to give permission to user roles in Additional Field Options -> Access Allowed To User Roles.

    Thread Starter brianreilly75

    (@brianreilly75)

    Thanks for the quick response – great plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display fields on front-end’ is closed to new replies.