Where can we add script or code on submitting the form?
Looking to insert / update data of the submitted form to a mySQL database.
Thank you in advance!
]]>...wp-admin/admin.php?page=checklist_option&tab=report
and deactivated some plugins on BACKEND URLS with
*admin.php?page=checklist_option*
When i open the page it works fine. Inside the page there is the following form to get some reports. It refreshes the page and the url is still the same but all plugins are loaded. I tried to open a new tab after submitting the form – still the same. Any idea how to keep the plugins deactivated?
<form method="POST">
<div class="row justify-content-center">
<div class="col-12 col-md-3">
<input type="text" id="date" class="form-control" name="date" placeholder="Click to select date" value="<?php echo isset($_POST['date']) ? esc_attr($_POST['date']) : ""; ?>">
</div>
<div class="col-12 col-md-3">
<button type="submit" class="btn btn-secondary">Generate Report</button>
</div>
</div>
</form>
]]>We have the pro version of the plugin. I’m looking to redirect any job applicants to a thank you page upon submission of the application form. Is this possible and if so how?
]]>Thank you for great plugin.
Note – www.penki.lt will open old website without split test plugin, the new website is on another server, it is in development mode.
Is it possible to track conversion on Popup, because all my forms opens a success message popup after submition. I can not use thank you page.
I tried to use popup url, but it doesn’t change in your plugin, when I click save, it displays – https://www.penki.lt/split-test-for-elementor/v1/tests/1/external-link-redirect/ even if I paste – https://www.penki.lt/#elementor-action%3Aaction%3Dpopup%3Aopen%26settings%3DeyJpZCI6IjI4ODYiLCJ0b2dnbGUiOmZhbHNlfQ%3D%3D (this is success message popup url).
I tried External page. Inserted html element () in success message popup, but then it calculates conversion immediately after I visit a landing page even if I don’t fill the form.
Maybe I could use javascript hook or something? I am not sure how to do it so I will appreciate if you guide me. Thank you!
]]>I have been trying to get any action hook to fire when I insert and/or update a pod on the frontend form. I have tried pods_api_post_save_pod_item and pods_api_post_save_pod_item_my_pod_name but these do not seem to fire. I even tried save_post but that is not either. I am trying to do some tasks when the submit is clicked on the pods created form.
I have deactivated all other plugins, tried a different theme. I have run these in snippets and also in a custom plugin. I know the save_post works when I update a page or post.
Here is an example that is not triggered:
add_action('pods_api_post_save_pod_item', 'my_test_function', 10, 3);
function my_test_function($pieces, $is_new_item, $id) {
$myfile = fopen("podsubmitlog.txt", "a") or die("Unable to open file!");
$date = new DateTime();
$date = $date->format("y:m:d h:i:s");
$txt = "Test function ---- ".$date."\n";
fwrite($myfile, $txt);
fclose($myfile);
}
I also set the pods settings so that the api is enabled for the pod, as well as individual fields. I also tried changing the hook priority, etc.
The weird thing is that I stumbled upon this action hook, that does not appear in the PODS documentation. But it actually does fire. Can I use this???
function action_pods_form_after_submit( $pod, $fields, $params ) {
//
$thetitle = $pod->field('post_title');
$thetype = $pod->field('post_type');
$myfile = fopen("podsubmitlog.txt", "a") or die("Unable to open file!"); // ../wp-content/plugins/jamie/
$date = new DateTime();
$date = $date->format("y:m:d h:i:s");
$txt = $date."--".$thetitle."--".$thetype."\n";
fwrite($myfile, $txt);
fclose($myfile);
};
// add the action
add_action( 'pods_form_after_submit', 'action_pods_form_after_submit', 10, 3 );
My form:
Just to be complete, my form is on a page, using this short code:
add_shortcode( 'edit_sitter', function () {
$out = ''; // init
$theurlparamname = 'sittertitle';
$theparam = get_request_parameter($theurlparamname);
$mypod = pods( 'sitter', $theparam );
$fields = array( 'post_title' => array( 'type' => 'text', 'label' => 'Name of Sitter)', 'required' => true ), 'email', 'cell', 'notes' => array( 'label' => 'My Notes', 'type' => 'paragraph' ), 'availability', 'sitteruserid' => array( 'hidden' => true, 'readonly' => true ), 'memberuserid' => array( 'hidden' => true, 'readonly' => true ) ); // note can't use defaults on edit
$thebuttontxt = 'Save Changes';
$sURL = site_url(); // WordPress function to get site url
//$thereturnlink = $sURL . '/my-sitters';
$thereturnlink = $sURL . '/view-sitter/?sittertitle='.$theparam;
$out .= $mypod->form( $fields, $thebuttontxt, $thereturnlink );
return $out;
} );
Again, the form functions correctly…
I am at a lose on what is happening. All pods features and all my 5 pod ityems save and work correctly. Any help is appreciated,
Jamie
Is there a way (or a setting) that this could be achieved within your plugin?
Thank you for your time!
]]>I use this code snippet to redirect with Elementor Form.
add_action( ‘elementor_pro/forms/new_record’, function( $record, $handler ) {
$handler->data[‘output’] = $redirectURL;
}, 10, 2 );
Does this add_action is overwritten by PayStack plugin?
]]>