Skip Navigation

[Resolved] Impossible to connect to new custom field using Toolset block "Repating Field"

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 10 replies, has 2 voices.

Last updated by Minesh 10 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2687882
Repeating_field.PNG
Paragraphblock_shows_costum_field.PNG
New_field_added_sakerhetsdatablad.PNG

I am trying to add a new Repeating field in one of my content templates.

First I created a new single line field in the Field group Tillbehör (and stated that the field was a repeating field).
The field does show up in the products edit page, so far so good.
Then I added a Repating Field block in the Content Template "Tillbehör". In the settings I am then supposed to choose that field using POST SOURCE = "Current Product" and then choose the right CUSTOM FIELD GROUP = "Tillbehör" and finally choose my new field in CUSTOM FIELD. But the select list CUSTOM FIELD never shows up after choosing the field group. So I cannot connect to my new field "Säkerhetsdatablad".

For now I have replaced the Repating Field block with a standard text block. The dynamic source selection work fine with that block and I am able to choose my new field. But I would rather use the repeating field block, since it is possible that I will need to enter more than one entry in my repeating field. Now it will only fetch the first instance of the field.

#2687906

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share details to what post you setup the values for multiple instance field. And where you are trying to add the repeating field block that does not display multiple instances? Please share URLs of all such required posts.

*** 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.

#2688978

Minesh
Supporter

Languages: English (English )

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

You are right - the field should appear but there is some conflict due to that its not showing.

I've set the repeating field block to display the field "Nedladdning" and I can see its working:
- hidden link

If you want you can workaround it by not adding repeating field block but instead add "Fields and Text" block and then try to add the "Nedladdning" field using shortcode.

#2688983

Well, how did you choose the field Nedladdning if it does not show up in the settings? And can you tell me what the conflict is?
The problem when using Fields and Text is that it does not support several repeated fields. Or does it?

#2688985

Minesh
Supporter

Languages: English (English )

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

I'm not sure about contact but what I've done is:

From the post selector box I've selected the post where repeating field is value is setup as you can see with the following screenshot:
- hidden link

And then I try to add a repeating field block and selected the field group and it automatically populated and I saved the content template.

You can go with "Fields and Text" block and try to select your field and it will show you the options how you want to display that field.

#2688990
leave_empty_or_not.PNG

That seemed to work... and just to be sure... I shoud leave the settings page empty and just click "insert shortcode"? Look at the attached image.

#2688997

Minesh
Supporter

Languages: English (English )

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

Yes - you can modify the separator if you want different then comma (,).

#2689006
comma-separations.PNG

Ahh, now I see that there are commas between the downloads shown under the tab Nedladdning when I use the Fields and text block ... Look at the attached image.
There is no way to have no separations? Or to make them invisible? With the Repeating Fields block there are no separation characters.

#2689015

Minesh
Supporter

Languages: English (English )

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

I've edit the block as HTML and adjusted the code as given under:

<div class="tb-repeating-field" data-toolset-blocks-repeating-field="1"><ol class="tb-repeating-field--ordered">[wpv-for-each field="wpcf-nedladdning"]<li>[types field='nedladdning' separator=""][/types]</li>[/wpv-for-each]</ol></div>

Can you please check if its working as expected.

#2689017
Ordered_numbes.PNG

Okey, I see that this is also a way to do it. How should I change the html in order to not have the numbers in front of each download? Look at the attached image. I guess I can use CSS to add some space between the fields.

#2689024

Minesh
Supporter

Languages: English (English )

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

I've changed the ol tag to ul and as you can see with the following code:

<div class="tb-repeating-field" data-toolset-blocks-repeating-field="1">
<ul class="tb-repeating-field--ordered">[wpv-for-each field="wpcf-nedladdning"]<li>[types field='nedladdning' separator=""][/types]</li>[/wpv-for-each]</ul></div>

And added the following custom CSS code to your content template's CSS box:

ul.tb-repeating-field--ordered li { 
    list-style-type: none; 
}

Can you please confirm it's working as expected now.

#2689027

Thanks Minesh, I have got several ways to workaorund the problem now. Great help.