• Resolved iqbal1486

    (@iqbal1486)


    Hi,
    Our client suggest to use pods framework to manange the content.
    We are using PODs plugin and pandarepeater field plugin too.
    Every thing seems to be working fine in admin dashboard.
    Now i want to perform CRUD operation on respective pod_name from frontend.
    So my first query come up with those repeater field.

    $pods_noo_resume = pods('noo_resume', $resume_id);
    $pods_noo_resume_fields = $pods_noo_resume->fields();
    echo $pods_noo_resume->form($pods_noo_resume_fields); 

    I have displayed form fields using above code on frontend.
    But the repeater fields are not displaying which are a part of above pod_name.
    See screenshot: https://drive.google.com/file/d/1YchEbQx5Ug5R4oKsDPRDmhsZrFzDh3Vm/view?usp=drivesdk
    can you please update with the code that i need to modify to show repeater fields and make it working with add/edit/update view of pods framework. ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • At the moment, only logged in users can access the repeater fields at the frontend.

    Give me a moment, I will see what I can do.

    Hi iqbal1486

    Is your form for logged in users only or open to the public?

    Thread Starter iqbal1486

    (@iqbal1486)

    Hi @colourful_panda

    My form is used for logged in user.
    The role of the users are like ‘candidate’, ’employer’.

    How to user repeater fields for the logged in user from the frontend?

    Plugin Author Coding Panda

    (@codingpanda)

    Hi @iqbal1486

    After a user logged in, they should be able to access the repeater field.

    Anyway, I have been working on version 1.4.0. With it, you should be able to let the public access the repeater fields. I haven’t released it as I need to do more testing, but you can down it from here: https://github.com/coding-panda/panda-pods-repeater-field

    After the update (don’t forget to clear your cache), you can go to the Advanced Option to open it to the public or add the following filter in your functions.php to set the conditions for accessibilities. For example, check user roles. In your case, ‘your_pod_slug’ should be ‘noo_resume’.

    add_filter(‘pprf_load_panda_repeater_allow’, ‘pprf_allow_fn’, 11, 2);

    /**
    * The repeater field is only for logged in users with edit_posts capability
    * If you want it to be available for the frontend users, you can use this filter
    *
    * @param boolean $allow_bln allow the form to be displayed
    * @param array $get_arr variables from $_GET
    * @return boolean still allow or not
    */
    function pprf_allow_fn( $allow_bln, $get_arr ){

    $pod_obj = pods(‘your_pod_slug’);
    if( $get_arr[‘podid’] == $pod_obj->pod_id ){
    $allow_bln = true;
    }
    return $allow_bln;

    }

    Let me know if any problems.

    Thanks for using the plugin.

    Plugin Author Coding Panda

    (@codingpanda)

    @iqbal1486
    I updated the plugin.

    Now you can go to the Advanced Field Options, go to the bottom and grant permission to a role to access the field.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to display pandarepeater field section in a pods form on frontend?’ is closed to new replies.