Can’t change field value

Home Forums Quform WordPress Can’t change field value

This topic is: resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #34707
    marianogi
    Participant

    Hi!
    I use the code in this URL (https://support.themecatcher.net/quform-wordpress-v2/guides/customization/modify-form-data-before-it-is-processed) to change the value of the full url stored in my custom database. I don’t want the full URL, I only want the file name to be stored.

    My code is:


    add_filter('quform_pre_process_4', function (array $result) {
    if (isset($_POST['quform_4_69'])) {
    $arrURL = explode ( "/", $_POST['quform_4_69'] );
    $_POST['quform_4_69'] = $arrURL[count($arrURL)-1];
    }
    return $result;
    });

    But it never executes because $_POST[‘quform_4_69’] is always unset, which is impossible because that field is always required.

    Thank you

    #34710
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34711
    marianogi
    Participant

    Hi!, thank you for your fast response and help, as always.

    Yes, I am sure 4_69 is the correct ID. And here you can check the form:
    https://sercodi.es/empleo-2/

    (I send the url like this because the comment cropped the ‘/empleo-2/’ part of the link, I don’t know why.

    Let me know if you need credentials to see the backend and my code.

    • This reply was modified 2 years, 2 months ago by marianogi. Reason: URL cropped and not working
    #34717
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 2 years, 1 month ago by Ally.
    #34719
    marianogi
    Participant

    Great!! thank you!, about that, can you tell me where to see all that variable combinations? I mean a documentation page or similar where I can learn all that variables. I think I saw another modifier (I don’t know how to call it) to write a date with another date format. I’d like to see all possibilities of it.

    Thank you again!

    #34721
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34724
    marianogi
    Participant

    Thank you!, this is a very useful information to me!. Hope you can make a documentation page soon.

    #34772
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34774
    marianogi
    Participant

    You leave me speechless. Believe me, you have the best plugin, support and documentation I ever see, after many years buying dozens of plugins and themes.
    Please consider making a multipurpose theme and I’ll be there! 🙂

    Thank you!!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy