Forum Replies Created
- AuthorPosts
- March 29, 2025 at 10:24 am in reply to: Create new input fields dynamically (Custom Post Type) #37739
veganwebagency
ParticipantHi
Thank you for your fast reply it works like a charm!
Is there also a way to give a description (below) to the created text field?
Regards
MichèleApril 17, 2024 at 3:17 pm in reply to: Text input field removes plus sign inside quform-cookie #36651veganwebagency
ParticipantHi,
Thank you for the fast answer!
It works like a charm!Regards
Michèleveganwebagency
ParticipantHi Ally
Thank you for your answer!
We realized, that the way we wanted to do it, wouldn’t be possible with Quform.
So we found a workaround and it works now like we need it to.Thank you for your help anyway !
Regards,
Michèleveganwebagency
ParticipantHi Ally,
Worked like a charm as always.
Thanks a lot!Best Regards,
Chrigiveganwebagency
ParticipantHi
Thank you for your fast answer.
I tried it out with a standard theme and you are right it works perfectly fine.
So it looks like I have to search the problem / conflict in my theme.Thank you anyways!
Regards
Michèleveganwebagency
ParticipantHi Ally,
Thanks a lot! Exactly what we looked for.
Have a great day!
Chrigiveganwebagency
ParticipantFor all future readers, Mailchimp has now defined the “state” field as mandatory as well, so the correct code would be:
$mergeFields['ADDRESS'] = [ 'addr1' => $form->getValueText('quform_1_11'), 'city' => $form->getValueText('quform_1_14'), 'state' => $form->getValueText('quform_1_15'), 'zip' => $form->getValueText('quform_1_12'), 'country' => 'CH' ]; if (empty($mergeFields['ADDRESS']['addr1']) || empty($mergeFields['ADDRESS']['city']) || empty($mergeFields['ADDRESS']['state']) || empty($mergeFields['ADDRESS']['zip'])) { unset($mergeFields['ADDRESS']); }
veganwebagency
ParticipantHi Ally,
Thank you for your clarifications.
We have implemented it as you suggested and it works fine.
Thanks a lot!
Best Regards,
Chrigiveganwebagency
ParticipantHi Ally,
Your method worked, but was not optimal for our application.
We solved it now with a hidden input field and JavaScript.
Here is the code, in case someone else needs the same thing sometime:
jQuery(document).ready(function($) { $('.hidden-input-field').hide(); $('.packages-container input[type="radio"]').on('click', function () { selectPackage('.' + $(this).val()); }); $('.hidden-selects-container .quform-element-select select').on('change', function () { selectPackage(':visible'); }); function selectPackage(selector) { const material = $('.hidden-selects-container .quform-element-select' + selector).find('select').val(); $('.hidden-input-field input').val(material); } });
- This reply was modified 3 years, 3 months ago by
veganwebagency.
veganwebagency
ParticipantWe have tested a little more.
– If you fill in all fields and send it it works.
– If you leave all fields empty and submit it overwrites everything.
– If you fill in only one field like “addr1” nothing happens.veganwebagency
ParticipantHi Ally,
Thanks for the answer.
The logic with the tag is working fine
But it’s still overwriting the address data if it’s send empty.
Was it working on your side?Best Regards,
Chrigiveganwebagency
ParticipantHi Ally,
Your were completely right.
The values were too long for the column type.
Thanks a lot!
Chrigi- This reply was modified 3 years, 3 months ago by
veganwebagency.
veganwebagency
ParticipantHi Ally,
It worked – thanks!
Best Regards,
Chrigiveganwebagency
ParticipantHi Ally,
Would be great if you could send me an example of 2.
Thanks a lot!
Chrigiveganwebagency
ParticipantHi Ally,
That would be great, my proposal would be under “Style – Global” above “Global CSS style”. (see attachement)
Best regards,
Chrigi- This reply was modified 3 years, 3 months ago by
veganwebagency.
Attachments:
You must be logged in to view attached files. - This reply was modified 3 years, 3 months ago by
- AuthorPosts