Skip Navigation

[Gelöst] Populate a Cred field with data linked to the type

This support ticket is created vor 8 Jahre, 11 Monate. 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.

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

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 3 Antworten, has 2 Stimmen.

Last updated by Adriano vor 8 Jahre, 11 Monate.

Assigned support staff: Adriano.

Author
Artikel
#209975

Pat

Hello,

Is it possible in a Cred form, to affect a specific value to a field that is already created?
For example, I have a type (Event) in which I have integrated a Cref form (Concours). I would like that a single ligne field (Nom) of this Cred form returns the Event's name. What's the best way to do this?
Regards
Pat

#210016

Dear Pat,

You will need two things to achieve that. A generic field to store these values and a view to populate it.

Your generic field should looks like:

[cred_generic_field field="teste" type="text" class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":0,
"default":[],
"options":[ [wpv-view name="Test New"] ]
}
[/cred_generic_field]

Then you need to create a view with the correct filter you want, the output format should be like that:

<wpv-loop>[wpv-item index=1]{"value":"[wpv-post-title]","label":"[wpv-post-title]"}[wpv-item index=other],{"value":"[wpv-post-title]","label":"[wpv-post-title]"}</wpv-loop>

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

#213605

Pat

Thanks Adriano

#213673

You are welcome.