Skip Navigation

[Resolved] Images and repeater URL via FluentForms to Toolset custom fields

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 1 voice.

Last updated by Minesh 4 weeks ago.

Assisted by: Minesh.

Author
Posts
#2843464

I'm using Fluent Forms Pro to add a custom post. For the most part, that works fine, but I also have fields to add multiple images ad multiple URLs. Those repeater fields don't map well in Toolset / the post.

For the images, I see the ID and an error "Please enter a valid URL address pointing to the image file."

For the URL's, I get this table code in the backend:
<div class="ff_entry_table_wrapper"> <table class="ff_entry_table_field ff-table"> <thead> <tr> <th>Column 1</th> </tr> </thead> <tbody> <tr> <td>hidden link; </tr> </tbody> </table> </div>

And this in the front-end

Externe koppelingen:

Column 1
https://
" title="
Column 1
https://
" target="_blank" rel="noopener">
Column 1
https://

#2843544

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you plese check with "Fluent Forms Pro" is they offer any hook that we can use to get the $_POST information when you submit the form after the entry is created then we can use that and normalize the $_POST information for the repeating field to create entry as per Toolset defined requirement.

However, I would like to know, do you have repating field group or repeating field.

It will be great if you can share problem URL where you added your form as well as admin access details then I will review your current structure and after that I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2844386

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Actually - there is no official integration with Fluent Forms with Toolset.

I'm not sure how Fluet Forms saves the images but with Toolset image custom field, you will require to save full image path with the custom image field name into the postmeta table.

For exammple - if you have a Toolset form, then following code should be used.

add_action('cred_save_data', 'ts_save_the_rf_sort_order_manually',10,2);
function ts_save_the_rf_sort_order_manually($post_id, $form_data) {
    // if a specific form
    if ($form_data['id']==32) {
             
        $field_slug = 'media-gallery';
 
        $field_content = $_POST['wpcf-'.$field_slug];
             
            $sort_order = array();
             
            delete_post_meta($post_id,'wpcf-'.$field_slug);
       
            foreach($field_content as $k=>$v):
                $sort_order[] = add_post_meta($post_id,'wpcf-'.$field_slug,$v);
            endforeach;
    
            update_post_meta($post_id,'_wpcf-'.$field_slug.'-sort-order', $sort_order);
       
    }
}

You can adjust the code as required that should be used with any of the fluet form hook. You can check with Fluet Form plugin support.

Please check the following related ticket:
- https://toolset.com/de/forums/topic/cannot-change-order-of-repeating-image-field-with-cred-form/#post-2625757