Skip Navigation

[Resolved] How do I add a SECOND LANG description field

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the customer essentially wanted to add another custom field to his post.
Solution:
This can be doing by going to Types -> Custom Fields and edit the post group for that CPT and then add the new field there.

This support ticket is created 6 years, 8 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 2 voices.

Last updated by PaulS4783 6 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#627253

I am using the "Classifieds" reference site in WPML mode.

When some users list an Advertisement they will complete the "description" field (Let's assume this means ENGLISH description)
Other users will leave this field blank (because they aren't comfortable with English) and complete a SPANISH description field.
Other users will want to complete both fields.

Yes, I realize that in WPML it's possible to translate the field.
But that's not what I need for this use case.
I actually want to give users the option of creating a description in either/both/neither ENGLISH/SPANISH and display exactly that.

How do I:
a) Create SPANISH description field that is exposed to the CRED form
b) Apply conditional logic on the single ad posting so that it only shows information in the first, second or BOTH language "Description" fields IF THERE IS CONTENT present.

#627389

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Thank you for contacting our support forum.

What you can do is to create a language selector radio group. This radio group will allow the user to select which language they want to select either or both language.

So your radio options will be.
English
Spanish
Both

If the user selects English then the respective english custom field will appear. Once you have set this up then you need to do the conditional for the fields.

Take a look at this link below to perform the conditionals in CRED.
https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/

Please let me know if this helps.
Thanks,
Shane

#627398

I'm not sure if that answers the question, really.

To go back one step.
a) I want to keep the existing "Description" text-area input field.
b) I want to create a second "Description" text-area input field.
c) When the CRED form is posted, the content within BOTH fields should be posted to the translated version of the post.

Let's start with that.
How do I do it?

#627407

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

So is it that this extra description field be the one where they can choose English or Spanish ?

Please let me know.
Thanks,
Shane

#627601

No.

See screenshot.
hidden link

I literally want a second description field.
So when the user posts an Advertisement, they have the option of filling out the English description, Spanish description, Both or None.

I assume that this is as simple as adding an extra custom field to the "Listings" post type.
The only reason I ask is because "Description" seems to be using the default post "body" field
i.e. I can't see any custom field called "description" in the Classifieds site.

#627799

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Then this is the instruction that you should follow to match what you want to achieve.
https://toolset.com/forums/topic/how-do-i-add-a-second-lang-description-field/#post-627389

All thats needed is the additional field and the checkboxes to tell what to display.

Thanks,
Shane

#628155

OK, I have added "Description - Alternative Language" as a custom field.
As you can see from the screen shot, the original "Description" field has access to the WYSIWYG toolbar.
The new custom field DOES NOT.
hidden link

So how can I give users access to WYSIWYG for this custom field?

#628414

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

The field type needs to be a WYSIWYG field.

Remove this field from the field group and add it as a WYSIWYG editor.

Thanks,
Shane

#629908

OK. Sounds straight forward.
thanks.