Forum Replies Created

Viewing 15 posts - 46 through 60 (of 70 total)
  • Author
    Posts
  • in reply to: Populate dropdown #29677
    Icemanmx
    Participant

    Hello
    I get only This 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.
    in reply to: Populate dropdown #29667
    Icemanmx
    Participant

    Ok
    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.
    in reply to: Populate dropdown #29665
    Icemanmx
    Participant

    Thanks, that worked, and you right i did not type right the column name.

    1000 thanks

    Best Regards
    Icemanmx

    Attachments:
    You must be logged in to view attached files.
    in reply to: Populate dropdown #29652
    Icemanmx
    Participant

    Hello
    Someone took a look yet?

    Icemanmx

    in reply to: Populate dropdown #29631
    Icemanmx
    Participant

    Hello
    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
    Icemanmx

    Attachments:
    You must be logged in to view attached files.
    in reply to: Populate dropdown #29623
    Icemanmx
    Participant

    Anyone can help?

    in reply to: file code.txt validation #26392
    Icemanmx
    Participant

    Thanks katw

    This function perfect now…

    Best Regards
    Icemanmx

    in reply to: file code.txt validation #26387
    Icemanmx
    Participant

    Hello
    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.
    in reply to: file code.txt validation #26355
    Icemanmx
    Participant

    Hello
    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
    TEST1

    But 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
    Icemanmx

    in reply to: file code.txt validation #26353
    Icemanmx
    Participant

    Thanks again,,,
    Will try it later today..

    Thanks

    in reply to: file code.txt validation #26310
    Icemanmx
    Participant

    Or even can use a api for codes….

    • This reply was modified 6 years, 11 months ago by Icemanmx.
    in reply to: Validate if name exist #25134
    Icemanmx
    Participant

    Hello
    Thanks, function perfect..

    Best Regards
    Icemanmx

    in reply to: Field to field #25018
    Icemanmx
    Participant

    Hello
    You should get a mail to info@themecatcher.net with the inlog info… Ally

    Thanks

    in reply to: Field to field #24988
    Icemanmx
    Participant

    Hello
    I did not get it function, but i will send you the form data to see what i mean…

    Thanks in advance
    Icemanmx

    Attachments:
    You must be logged in to view attached files.
    in reply to: Field to field #24968
    Icemanmx
    Participant

    Can i get help with this?
    I have a paid support

Viewing 15 posts - 46 through 60 (of 70 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy