CRED plugin allows you to build forms that create child posts and set parents for these posts, supporting the parent-child relationship functionality from Types plugin.
When you ask for help or report issues, make sure to tell us the structure of your content and the relationship between the content types.
Viewing 15 topics - 631 through 645 (of 660 total)
Problem: When editing a child post with CRED, if I deselect the parent post and submit the form I can see that _wpcf_belongs_parentslug_id = 0 in the database. However, if I perform the same change in wp-admin, _wpcf_belongs_parentslug_id is completely deleted for this post. I have a conditional set up that tests whether or not the _wpcf_belongs_parentslug_id field exists, and it's failing because 0 is not the same as not exists.
Solution: For now, it's probably best to work around this discrepancy because relationships are changing in the very near future.
Problem:
1.) Is there a way to use Zapier to pass the values of the form upon submitting to my email service provider, such as ActiveCampaign?
2.) Is there a way to re-create the form in this GIF?
On the backend, for each value (e.g. 1 BR, 2 BR, etc.) or value-mix (e.g. 1 BR, 1 BA) there is a corresponding URL that I can associate with that combination
3.) For both of these, how difficult is it to create something like this with CRED?
Solution:
1. We offer the cred_save_data API hook that can be used to capture any information submitted in a form, but there is no integration specific to Zapier or ActiveCampaign. With custom code, it may be possible to send that data to another 3rd-party tool using PHP.
2. This type of custom form interface will require a significant amount of custom code. The types of CRED form inputs we offer are text fields, select fields, radio groups, and checkboxes. The types of inputs I see in this GIF are range sliders and images that act like radio controls. Neither of these is supported by CRED and must be built from scratch using custom HTML, CSS and JavaScript.
It's not standard behavior in CRED to redirect to a URL containing all the selected URL parameters, but it's possible with some custom code. Assuming these are custom field values, then you can use the cred_success_redirect API hook to redirect the User to any URL you'd like, including URL parameters based on the values they chose in the CRED form.
3. Advanced knowledge of PHP, JavaScript, HTML and CSS is required to pull this off in CRED. It cannot be accomplished simply using the wp-admin interface.
Then update the field value with CRED action hook "cred_save_data", for example:
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==123)
{
if (isset($_POST['_wpcf_belongs_product-listing_id']))
{
// add it to saved post meta
update_post_meta($post_id, '_wpcf_belongs_product-listing_id', $_POST['_wpcf_belongs_product-listing_id'], true);
}
}
}