Mattmcca
Forum Replies Created
-
Hi I managed to solve this issue thank you for all the help that was provided
Hi thank you so much I will carry on investigating the issue, I would like to ask . Am I able to use the following items in add_action, since two of these variables are wordpress functions
global $wpdb;
$numberOfBookings = 0;
$current_user = get_current_user_id();<?php
/**
* Plugin Name: [FluentForms] - Fluent Forms Insert Into Database After Form Submission
* Description: Charge dealer dependent on the number of bookings they have made.
* Author: Matthias McCarthy
* License: GPLv2 or later
* Version: 1.0.0
*/
add_action('fluentform/submission_inserted', 'charge_dealer_submission_function', 20, 3);
function charge_dealer_submission_function($submissionId, $formData, $form)
{
if($form->id != 3) {
return;
}
global $wpdb;
$numberOfBookings = 0;
$current_user = get_current_user_id();
$numberOfBookings = $wpdb->get_var($wpdb->prepare(
"SELECT value FROM krv_fluentform_entry_details WHERE submission_id = %d AND field_name = %s",
$submissionId,
'numeric_field'
));
}
?>Let me update the question then as i found some of the issues. Every time I submit, $submissionId is returning as null in my code. is there something that I am missing
Hello, thanks for the support that was given, issue was finally resolved
Yep I had given you access to the file
Hi
sorry for the late reply, i had given you access to the reply, please advise on this issue please$balanceQuery = 5 $currentCredits = 5 $intitalSetupQuery = 25 $intitalSetup = i $isUserTerminatedQuery = 0 $userTerminated = false $isUserPayAsYouGoQuery = false $isUserPayAsYouGo = false
The issue was the highlighted sections where hidden when meeting certain conditions and the html message being shown this is no longer happening now
https://drive.google.com/file/d/16MANhIhxW-5jLU6jr_fxCr_3OE_SWprP/view?usp=drive_link- This reply was modified 7 months, 1 week ago by Mattmcca.
Hello
The issue is that some of the buttons before the latest wordpress update where being hidden according to the user’s balance if there exceed a certain amount this is no longer happening. I am using wordpress version 6.5.2 and Version 1.29.3
Form code
https://drive.google.com/file/d/1ZTyc6w13Q3vLmQDyVYVoUkY0xU7eV5Uk/view?usp=sharing
Before in the console i was able to debug the script i cant anymoreHello whilst testing I noticed a bug, i am getting two email submissions when using the above
Thank you this solves my issue
Thank you so much, this is going to help me out so much, in regards to the second question, I would like to incorporate it with the submitted code. So do I change
$entries = Forminator_API::get_entries( $form_id );
to
$entries = Forminator_API::forminator_get_latest_entry_by_form_id( $form_id );Hello I have updated the plugin to the latest version.
I would like to hide the submit button when the user has used a certain amount credits on the system, this feature used to work before it now longer works all of a suddenMight I add, this is for a custom plugin that I have worked on, I would like to prevent a method calling a database insert when an invalid request has been made
Hi Sorry about that, fixed the link you should be able to access it now
Thank you this is what i needed, just note one thing i tired at first to use an input field but in the sending of the recipients, i was not able to add input field, I changed it to email and it worked