Home › Forums › Quform WordPress › sending product variables
- This topic has 4 replies, 2 voices, and was last updated 1 week ago by Ally.
- AuthorPosts
- December 4, 2024 at 10:50 am #37578schmuckiParticipant
Hello
we’re building a productfinder right now. There are around 60 products in the library.
It’s possible to buy a product through filling out the form. Is it possible for quform to know which product was clicked on within the list of 60?Best regards
StaninDecember 5, 2024 at 11:13 am #37581AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 12, 2024 at 7:43 am #37584schmuckiParticipantHi
It is a popup form we’re using. I’ll try with this documentation you sent us https://support.themecatcher.net/quform-wordpress-v2/guides/customization/dynamic-default-value/.
Thanks alot
December 24, 2024 at 9:34 am #37617schmuckiParticipantHi
What we are planning exactly is as follows.
We use a page template in WordPress. The template contains the basic structure of our site as an HTML framework to hook into via Javascript.
When loading the template page, a JS is used on the frontend side to fetch content via WordPress API, filter it and attach it to the HTML structure as a table. This dynamically generated content also includes buttons that open a popup containing the Quform form. Depending on which button is clicked, the Quform form is to receive data that is to be sent as an email in addition to standard fields like name, adress, etc.
So far I have tried to place the form in the popup via shortcode:<div class=“quform-popup-content”><?php echo do_shortcode('[quform id=“14” name=“Contact form Product-Finder”]'); ?></div>
which is generated by the template on the server side and is set to display:none; until hitting the button. I then addressed a hidden field contained in the form via JS and reset the “value” property to:
<input type=“hidden” name=“quform_14_17” value=“XXX”>
However, when I submit the form, the hidden field is empty, so no data is transmitted.
So how can I transmit values to the already integrated form at runtime? Since PHP is generated on the server side, I can only include the form when the page is loaded, right?I would be very happy to receive a suggestion for a suitable workflow.
December 30, 2024 at 11:21 am #37618AllySupport StaffYou 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 1 week ago by Ally.
- AuthorPosts
- You must be logged in to reply to this topic.