What am I doing wrong?
<?php
add_action(‘post_process_run_action’, ‘hello’, 2);
function hello($data){
global $wpdb;
$a = $wpdb->prefix.’lkw_products’;
$wpdb->insert($a, array(
‘name’ => 123,
‘ProductID’ => 456));
}
For some reason I cannot get conditions to work for Save as Post Type, I select ‘use’, then I select the field and the condition, but it will not save them. Whenever I go back to the form the settings I saved are not there, so I cannot use the conditions function.
]]>Is it possible to get the id of the entry or some type of unique ID so I can reference the original entry if I need to
]]>Hello, nice plugin.
Please i was just wondering if there is a way i can use a php code in one of the caldera forms text box? i actually needed to echo something.
Thank you
]]>I am attempting to use a run action to set a newly created posts terms upon submit. This was starting to be addressed on another thread but not resolved.
Starting a unique thread here. similar to an unresolved issue over here: https://www.ads-software.com/support/topic/fields-not-displaying-2?replies=26
My action does not seem to be inserting the terms. Below is my settings and Action.
I am using the plugin: Caldera Forms, Caldera Custom Fields, & Run Action
Run Action:
Theme Functions Action
//action: caldera forms Set Taxonomy
add_action( ‘cf_set_features_taxonomy’, ‘cf_set_slug_process_form’,55);
function cf_set_slug_process_form( $form ) {
//put form field data into an array $data
$data= array();
foreach( $form[ ‘fields’ ] as $field_id => $field){
$data[ $field[‘slug’] ] = Caldera_Forms::get_field_data( $field_id, $form );
}
//get embedded post ID.
$embeded_post_id = absint( $_POST[ ‘_cf_cr_pst’ ] );
wp_set_object_terms( $embeded_post_id, $data[ ‘taxonomy_term_slug’ ], ‘taxonomy_name’, true );
}
//If I set the $embeded_post_id = 720, and the $data=array(20,40) then the post id 720’s taxonomy is assigned 20 & 40. If I update one or the other neither is updated.
https://www.ads-software.com/plugins/caldera-forms-run-action/
]]>Hi,
We’ve tried to implement a third party connector but could not get it running.
Something similar to https://www.alexhager.at/how-to-integrate-salesforce-in-contact-form-7/ and https://www.ads-software.com/plugins/forms-3rdparty-integration/
It appears that Caldera forms generates the field names dynamically and as a result it’s difficult to hook into these fields using a custom.
I’m also assuming that the action/filter field is a link to a custom function defined in a theme or plugin? (excuse my ignorance, WP internals are still a bit of a mystery) Some more info/docs in the description of WP.org would be great.
I don’t want to sound negative, this plugin and Caldera itself is great. Some more info would help broaden this plugins usage. e.g. how to perform the action once a form has been submitted.
Cheers,
David
https://www.ads-software.com/plugins/caldera-forms-run-action/
]]>