CRED plugin provides an API, making it easy to customize your post or user forms. The API includes hooks (actions and filters) to accomplish specific tasks using PHP code.
When you ask for help or report issues, make sure to tell us all related information about your form and what you want to achieve.
Viewing 15 topics - 856 through 870 (of 1,234 total)
But, it needs custom codes, for example, when user submit the CRED form, the post is saved into database, you can use hook "cred_save_data" to trigger a custom PHP function, in this function, you need to:
1) get the value of "URL of the video uploaded", if it is a custom field created with Types plugin, you can use Types function types_render_field() to get the field value:
Problem:
How to replace the To: recipient of a CRED notification email?
Solution:
Client is using the cred_notification_recipients filter to customise the To: recipient of a CRED notification email, but her code is *adding* another To: recipient rather than replacing the existing one.
A minor tweak of her code was required to fix the issue, as outlined below.
The issue here is that the user wanted to display the created post ID on their form submission message. Solution:
Unfortunately this seems not to be possible however the user opted to redirect to the page that was created using CRED by using the following hook
//redirect after post creation
add_filter('cred_success_redirect', 'custom_redirect',10,3);
function custom_redirect($url, $post_id, $form_data)
{
if ($form_data['id']==150) //Change this to your form's ID
//Get that Post's Permalink of Target Page
$permalink = get_permalink(130);
//Return the URL to where to redirect:
return $permalink."?created_post_id=".$post_id ;
return $url;
}
Problem: I have added some custom code using the CRED API which should modify the notification email recipients list and include the parent post's author email address. It does not seem to be working.
Solution: Check the syntax and be sure your variables are correct. In this case the parent_post_author_id variable was not correctly identified with a $. The corrected code is:
I have a cred form which has multiple sets of repeating field groups (latest beta) within it. I want to require the user to enter a minimum number of entries in each of the groups.
Solution:
The client has achieved it by custom JS codes instead of using CRED filter hook "cred_form_validate", see it here: