[Resolved] Populate a Cred field with data linked to the type

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.

This topic contains 3 replies, has 2 voices.

Last updated by Adriano 5 years, 11 months ago.

Assigned support staff: Adriano.

Author
Posts
#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

Adriano
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

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

Adriano
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

You are welcome.