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
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?
My issue is resolved now. Thank you!