Skip Navigation

[Resolved] Set field predefined value by parent data doesn't work

This support ticket is created 6 years, 9 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.83 hours from now. Thank you for your understanding.

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

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#615195

I am trying to:
specify value of field in form by post parent data, but it doesn't work not as by parent, not a s just a post:

[cred_field field='appointment-email' post='appointment' value='[types field='ir-email' id="$initialreview"][/types]' urlparam='emailid' class='form-control' output='bootstrap']

and

[cred_field field='appointment-email' post='appointment' value='[types field='ir-email' id="44077"][/types]' urlparam='emailid' class='form-control' output='bootstrap']

both return empty value for the field.
But [types field='ir-email' id="44077"][/types] has a itself value.

#615233

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - it looks like nested shortcode issue that will not parsed.

What if you create a custom shortcode that will return the parent ID and use this custom shortcode and assign it to value attribute of CRED form's field shortcode instead of types shortcode .

#617221

I'm not sure that you mean.
Do you mean that I should use some shortcode instead of "[types field='ir-email' id="44077"][/types]"
It looks like problem not about shortcode with parent id, this is about shotrcode in general to be placed in CRED form value param.
Or could you give me more specific example?

#617747

Minesh
Supporter

Languages: English (English )

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

Well - I tested this and following code works for me:

[cred_field field='post_title' post='city' value='[types field="state-url" id="525"][/types]' urlparam='' class='form-control' output='bootstrap']

So, you should try the following code - it should work:

[cred_field field='appointment-email' post='appointment' value='[types field="ir-email" id="44077"][/types]' urlparam='emailid' class='form-control' output='bootstrap']