Looking for the right hook to trigger SQL query

Home Forums Quform WordPress Looking for the right hook to trigger SQL query

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33881
    csimstewart
    Participant

    I’ve written a PHP function which will perform a lookup in a custom table and pull in additional values to populate a Quform dropdown. I want this function called after the user enters input into a certain field. The function is currently set up with a static value for testing and is functioning properly using the
    add_action('quform_pre_display_1', 'my_form_values');

    However, this only works with my static testing value as this hook launches before any input from user. What hook can I set to send the value and trigger my function after the input for that part of the form is entered?

    Basically the user picks a product and I lookup the current pricing options and return it on the next section of the form.

    $product = $form->getValue('quform_1_10');

    this $product will be used in the WHERE statement of the sql query.

    Thanks for any help in advance!

    #33882
    oivanr
    Participant

    Hi,
    This must be done through a js function calling php.
    I suggest to read this subject: php call through ajax
    Regards,

    #33887
    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.

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