Skip Navigation

[Resolved] Problem with cred form and repetable group of fields

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 1.64 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 10 replies, has 2 voices.

Last updated by Christian Cox 5 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1334389
capture.jpg

I have a a form to edit a repetable group of fields.
The form works very well when I'm on the French page but when I'm on the English page, I can not select the post to add the repetable field group. The select is grayed out (see capture). I use wpml for traduct page.

#1334665

Hi, technically a repeatable field group's parent post is managed with post relationships. The RFG is a child of the parent post, in a one-to-many relationship. So managing RFG parent posts is similar to managing other post relationships with Forms. Normally you cannot manage post relationships in a secondary language Form. Is English a secondary language on your site? If so, this inactive parent field is expected. You should first create content in the primary language, and manage the post relationships there. Then translate the posts (or RFGs), and the post relationships will be maintained automatically. See the documentation here for more information: https://toolset.com/documentation/translating-sites-built-with-toolset/translating-related-content/

#1334773

Hi Christian,
The problem is that the custom post type is not translatable in the wpml options and it should not be, it's the same post in French and English. But I must be able to translate the form ...
How to solve this problem ?
Thanks
Olivier

#1334777

I also tested by creating posts in English but the selection is still unavailable, why?
Here is the code I use to display the selector...

[cred_field field='@collaborateur-projet.parent' class='form-control' select_text='--- non défini ---' author='$current' order='date']
#1335391

it's the same post in French and English. But I must be able to translate the form ...
I also tested by creating posts in English but the selection is still unavailable, why?
The documentation link I shared explains that related content must be created in the default language first. I assume French is the primary language here, so your site Users should not be allowed to create new RFGs in English. There isn't any code-based workaround or solution available for this, unfortunately.

One idea is to redirect secondary language Users to the primary language site Form. When they create content, it will be created in the default language site. That will allow post relationships to continue to work correctly with WPML. The Form input labels can be displayed in both languages, so primary and secondary language Users can understand how to use the Form.

If you'd like to allow secondary language Users to create related content first in the secondary language, without creating the content in the primary language, that workflow is not currently supported. You are welcome to use our suggestion forms to vote for adding this to the current software:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
https://wpml.org/suggest-a-new-feature-for-wpml/

#1335483

Hi Christian,
Unfortunately, this is not an option for my client...
And why the form doesn't work when the CPT are traduct too, the select must be acitvated no?
Thnaks.

#1335847

And why the form doesn't work when the CPT are traduct too, the select must be acitvated no?
In a new RFG Form shown on the secondary language site, the parent post select field will not be active. It will only be active in the primary language because post relationships cannot be modified in a secondary language. The parent post is selected only once, in the primary language Form. Then the post relationships are automatically maintained in other translations of the post / RFG.

#1336265

Hi Christian,
Sorry but I do not understand.
You tell me it is impossible to translate a CPT containing repetable group of fields? So it is impossible to translate a form containing repetable field groups? This seems to be a minimum for plugins that are supposed to be compatible ... Thank you very much.

#1337005

You tell me it is impossible to translate a CPT containing repetable group of fields?
Not exactly. I am telling you only one workflow is possible: the CPT and repeatable field groups must be created first in the primary language, then they can be translated into a secondary language. The problem is that your project requires the ability to create content in a secondary language first in some cases, then have that content show up on the primary language site. That workflow is impossible right now because of how post relationships and WPML translation modes work. In some projects, this issue is a show-stopper. Other tickets discuss similar issues:
https://toolset.com/forums/topic/wpml-with-post-relationship-in-cred-forms/
https://toolset.com/forums/topic/post-relationships-for-secondary-languages-only-post/
https://wpml.org/forums/topic/assign-translated-child-page-to-different-translated-parent-page/

Our founder Amir discussed a similar issue in a WPML blog post:
https://wpml.org/2018/01/wpml-3-9-released/#comment-1712539

Most of the Toolset development priority lately has been on the new Blocks Editor. This is why it is very important that you make a suggestion in the request form. It will let our management know how important this is for you, so priority can be added here.

So it is impossible to translate a form containing repetable field groups?
Not exactly. A single Form will never contain more than one repeatable field group. There is only one Form, which is used in all languages to create or edit a single row of a repeatable field group. It is possible to translate the text shown on the Form using WPML String Translation.

#1338443

<hi,
Where can I use this request form ?

#1338949