Forum Replies Created
- AuthorPosts
Icemanmx
ParticipantHello
I get onlyThis value is not valid
.
I have zipped one file with the codes and the sql so maybe you can help me with it, i really need this…I really don´t want to disturb you so much, but i can´t find the problem by my self…
Best Regards
Icemanmx- This reply was modified 5 years, 11 months ago by
Icemanmx.
Attachments:
You must be logged in to view attached files.Icemanmx
ParticipantOk
One more thing i forgot about..
Now when i have the code in the database, how can i read it from database and validate that the code excist before sending the form data.function encuesta_notification_content( PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form ) { ob_start(); include __DIR__ . '/encuesta-post-evento.php'; $mailer->Body = ob_get_clean(); } add_filter( 'quform_pre_send_notification_1_1', 'encuesta_notification_content', 10, 3 ); add_filter( 'quform_element_valid_1_37', function ( $valid, $value, $element ) { //$pathcheck = WP_PLUGIN_DIR . '/surveyhdapg/codes.txt'; // This just checking the path to the wp-plugin folder. //echo '<script language="javascript">'; //echo 'alert("Path:' . $pathcheck . '")'; //echo '</script>'; $codes = file( WP_PLUGIN_DIR . '/surveyhdapg/codes.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES ); if ( !in_array( $value, $codes ) ) { $element->addError( 'Código no válido' ); $valid = false; } return $valid; }, 10, 3 );
I hope i explained it okay…
Best Regards
Icemanmx- This reply was modified 5 years, 11 months ago by
Icemanmx.
Icemanmx
ParticipantThanks, that worked, and you right i did not type right the column name.
1000 thanks
Best Regards
IcemanmxAttachments:
You must be logged in to view attached files.Icemanmx
ParticipantHello
Someone took a look yet?Icemanmx
Icemanmx
ParticipantHello
I put all in one zip file, screens and debug logs, server log and wp debug log.
I need to say i have php 7.3 installed…Best Regards
IcemanmxAttachments:
You must be logged in to view attached files.Icemanmx
ParticipantAnyone can help?
Icemanmx
ParticipantThanks katw
This function perfect now…
Best Regards
IcemanmxIcemanmx
ParticipantHello
I already try that without the trailing slash, but he don´t read the txt file what i put in it… Maybe need right permissions, but i try 666 and 644 and did not help…Best Regards
Icemanmx- This reply was modified 6 years, 11 months ago by
Icemanmx.
Icemanmx
ParticipantHello
I did not function for me.add_filter('quform_element_valid_1_37', function ($valid, $value, $element) { / $codes = file(WP_CONTENT_DIR . '/surveyhdapg/codes.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (!in_array($value, $codes)) { $element->addError('Código no válido'); $valid = false; } return $valid; }, 10, 3);
I have all the files under plugin folder /surveyhdapg/codes.txt in that text file i have one word on each row:
test
test1
TEST1But i get the error Código no válido
I also tried to put 666 permission on the txt file, but normally 644 should be okay..
Best Regards
IcemanmxIcemanmx
ParticipantThanks again,,,
Will try it later today..Thanks
Icemanmx
ParticipantOr even can use a api for codes….
- This reply was modified 6 years, 11 months ago by
Icemanmx.
Icemanmx
ParticipantHello
Thanks, function perfect..Best Regards
IcemanmxIcemanmx
ParticipantHello
You should get a mail to info@themecatcher.net with the inlog info… AllyThanks
Icemanmx
ParticipantHello
I did not get it function, but i will send you the form data to see what i mean…Thanks in advance
IcemanmxAttachments:
You must be logged in to view attached files.Icemanmx
ParticipantCan i get help with this?
I have a paid support- This reply was modified 5 years, 11 months ago by
- AuthorPosts