Problem:
How can I add a class to the CRED delete Post link?
Solution:
You can add the Class for this Button within the CRED Delete Post ShortCode, and eventually some inline style if needed.
Example:
[cred_delete_post_link class='your-classes-here cred-refresh-after-delete' style='your-custom-style-here' text='Delete %TITLE%' action='trash' message='Are you sure you want to delete this post?' message_show='1']
This is how you would produce a Bootstrap Button as example, adding the Class to the CRED ShortCode:
[cred_delete_post_link class='btn btn-danger btn-xs cred-refresh-after-delete' style='your-custom-style-here' text='Delete %TITLE%' action='trash' message='Are you sure you want to delete this post?' message_show='1']
And a FontAwesome added:
[cred_delete_post_link class='fa fa-trash-o d-refresh-after-delete' style='style' text='' action='trash' message='Are you sure you want to delete this post?' message_show='1']
Note:
This issue is a bug. Cred version number 1.6. It will be fixed in future release.
Problem:
When inserting a user_email field in a Cred User Form and checking the 'Readonly' checkbox the expected result on the frontend is not achieved. The user_email field is editable and not greyed out. When submitting the form, the email input is being saved to the user details.
Problem:
How can I set a Post that is submitted with CRED, to be child to the Post, where the Form is inserted?
I also need to update it's title with a value coming from a Post Field
Solution:
You will use a Custom CRED API (cred_save_data) and Wordpress API (mainly get_ and update_post_meta) to achieve this
You will put the function created into your Theme's functions.php
In the Code, you will:
get_post_meta the field's value with which you want to update your Post title
wp_update_post the title with the above value
You must note that the parent post ID in this case will be the ID of the Post where you show the CRED, and this is stored in the CRED API $form_data['container_id'];
With this value you update the posts hidden field _wpcf_belongs_parent-post-slug_id