Home › Toolset Professional Support › [Resolved] WYSIWYG generic field form problem
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)
This topic contains 19 replies, has 2 voices.
Last updated by Minesh 1 year, 4 months ago.
Assisted by: Minesh.
Tell us what you are trying to do?
I'm implementing the following form with some precompiled fields
CODE in attacched PNG and siply version at end of this post:
But when I open the form I can't see conditional output of WYSIWYG field and if I submit the form the WYSIWYG field value is not saved
CODE: [credform]
[cred_field field='form_messages' class='alert alert-warning']
<div class="form-group">
<label for="%%FORM_ID%%_send-to">[cred_i18n name='send-to-label']Send to[/cred_i18n]</label>
[cred_field field='send-to' force_type='field' class='form-control' output='bootstrap']
</div>
[cred_generic_field type='select' field='post_title']
{
"required":0,
"default":[],
"options":[{"value":"accepted","label":"accepted"},{"value":"rejected","label":"rejected"}]
}
[/cred_generic_field]
[cred_show_group if="( $(post_title) eq 'accepted' )" mode="fade-slide"]
[cred_generic_field type='wysiwyg' field='post_body']
{
"default":"Dear Mr. [wpv-post-title item="$currentpage"] we accepted your cv
Thanks Mr.
}
[/cred_generic_field][/cred_show_group]
[cred_show_group if="( $(post_title) eq 'rejected' )" mode="fade-slide"]
[cred_generic_field type='wysiwyg' field='post_body']
{
"default":"Dear Mr. [wpv-post-title item="$currentpage"] we rejected your cv
Sorry Mr.
}
[/cred_generic_field][/cred_show_group]
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]
After new changed to the code I understood the problem was in [wpv-post-link item="@job-candidate.parent"]
I don't know why but if I use [wpv-post-title item="@job-candidate.parent"] i have not any problem.
Could you say me where is the error?
Hello. Thank you for contacting the Toolset support.
Based on the form's code you shared with us I can see that you added the conditional display based on the post title:
[cred_show_group if="( $(post_title) eq 'accepted' )" mode="fade-slide"] [cred_generic_field type='wysiwyg' field='post_body'] { "default":"Dear Mr. [wpv-post-title item="$currentpage"] we accepted your cv Thanks Mr. } [/cred_generic_field][/cred_show_group] [cred_show_group if="( $(post_title) eq 'rejected' )" mode="fade-slide"] [cred_generic_field type='wysiwyg' field='post_body'] { "default":"Dear Mr. [wpv-post-title item="$currentpage"] we rejected your cv Sorry Mr. } [/cred_generic_field][/cred_show_group]
- Do you want to compare the post title added by user and what to compare that input title value with conditional display?
In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/
Do you want to compare the post title added by user and what to compare that input title value with conditional display?
EXACTLY
Now, with my code it works but I have some troubleship.
1) If I select "first option" in combo the WYSIWYG field is correctly loaded but if I select the "second option" the WYSIWYG field has loaded in Html Mode and I can't switch to visual mode
2) if I use [wpv-post-link item="@job-candidate.parent"] instead of [wpv-post-title item="@job-candidate.parent"] the the WYSIWYG field has not loaded and it doesn't work
That is strange. Can you please share problem URL and admin access details where I can see the issue.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
It asks for for authorization access when I try to access the wp-admin.
Can you please send me authorization access details.
I have set the next reply to private which means only you and I have access to it.
Thank you for authorization access details and that works and I can able to reach to the login page.
But when I try to login using the wp-admin access details you shared that is not working at this end. Can you please send me working wp-admin access details.
I have set the next reply to private which means only you and I have access to it.
I've set the private reply where you shared the authorization access details and its not public now.
Again, I checked with the latest admin access details but still I'm not able to login to admin using the latest admin access details you shared with your previous reply.
Can you please send me working admin access details.
I have set the next reply to private which means only you and I have access to it.
Thank you for sharing admin access details and this time its working.
Can you please share problem URL on what page/post you have added the form?
hidden link
Again when I try to login to wp-admin, I get the following error:
Error: The username test is not registered on this site. If you are unsure of your username, try your email address instead.
Can you please send me working admin access details.
I have set the next reply to private which means only you and I have access to it.
Thank you for sharing admin access details. This time I'm able to login to admin but I can only access the profile page. It seems you forget to grant admin capabilities to the admin user you shared. Can you please grant admin rights so that I can able to access the wp-admin.
I have set the next reply to private which means only you and I have access to it.
Ok now the user "test" is an administrator
Can you please check now: hidden link
The first issue is resolved. Now you will be able to see the WYSIWYG editor with both "accepted" and "rejected" options.
I've adjusted the field names as in the form the field names should be unique so I've added the post_content field as given under:
=> hidden link
- As you may noticed the fields added as "post_content_accepted" and "post_content_rejected":
[cred_show_group if="( $(post_title) eq 'accepted' )" mode="fade-slide"] [cred_generic_field type='wysiwyg' field='post_content_accepted'] { "default":"Mx. [wpv-post-title] <br /> accepted for \"[wpv-post-title item="@job-candidate.parent"]\" <br /> ciao " } [/cred_generic_field] [/cred_show_group] [cred_show_group if="( $(post_title) eq 'rejected' )" mode="fade-slide"] [cred_generic_field type='wysiwyg' field='post_content_rejected'] { "default":"Mx. [wpv-post-title] <br /> rejectd for \"[wpv-post-title item="@job-candidate.parent"]\" <br /> ciao" } [/cred_generic_field] [/cred_show_group]
I used unique field name that corresponds with post type field because I 'd want save the content. Now, with your istructions, when I submit the post the value hasn't saved