Skip Navigation

[Resolved] Can't store a post reference with toolset form

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

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)

Author
Posts
#1345925

Tell us what you are trying to do?
I want to send an email to a member (custom type with an email field)

Is there any documentation that you are following?
https://toolset.com/forums/topic/specific-contact-form/

So I create a custom type for the message and a form. After switching to advanced mode i write the code :
[credform]
[cred_field field='form_messages' class='alert alert-warning']
<div class="form-group">
<label>Sender email</label>
[cred_field field='messagefrom' force_type='field' class='form-control' output='bootstrap']
</div>
<div class="form-group">
<label>Sujet</label>
[cred_field field='post_title' class='form-control' output='bootstrap']
</div>
<div style="display:none;">[cred_field field='messageto' force_type='field' class='' urlparam='' value="$current_page"]
[cred_generic_field field='member-email' type='email' class='' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"default":"[wpv-post-field name='wpcf-memberemail' id='$current_page']"
}
[/cred_generic_field]</div>
<div class="form-group">
<label>Contenu Message d'un visiteur</label>
[cred_field field='post_content' output='bootstrap']
</div>
[cred_field field='form_submit' output='bootstrap' value='Envoi' class='btn btn-primary btn-lg']
[/credform]

All the fields except messageto are filled. I just want it links to the correct member

#1346049

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Do you mean that you want to assign/set the default value when you display your post reference field with your form. And you want to assign the default value that is the ID of your current page?

#1346481

My issue is resolved now. Thank you!