Developer Question – Custom Fields on Quform

Home Forums Quform WordPress Developer Question – Custom Fields on Quform

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #27581

    I have a development question. What is the best way to add custom elements to a form? The example I have is I have a series of autocomplete search fields that I use to grab info from a mysql db using ajax, show the results in a text area field, then when I select one of the results it prepopulates the rest of the fields on the form where the data matches.

    It works great. However, I think I may have added the custom code to a file that is less advantageous and appropriate. I added the code to the /includes/elements/text.php and textarea.php files. But when I view the source for the form, I see that the custom code I have implemented appears once for every text element on the form. I have roughly 52 text fields, so you can only imagine the amount of unnecessary code this has generated.

    What is the best way to implement custom fields and code on a form that is more portable and has less impact on the quform source?


    Here is a visual example of my autocomplete search so you can have a better idea of what I am trying to accomplish. I have 4 quform text fields that bring up search results below as you begin to type and it finds matches in the mysql database. As I said, it works great. However, placing the code in the elements php files obviously is not the best way to embed custom fields as it repeats my code 1 time for each text field on the form.

    Do you have any suggestions?

    You must be logged in to view attached files.
    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