1

I run expression engine v2.10.1 with exp:resso store 2.5.1 and have installed Forms module 3.5.3.

I created a test form and included it here

I have included a HTML section in the form where i load the current Cart contents.

My Question: Is it possible to include the shown html section in the form submission?

If not, is there another way to include current cart into a Form entry?

1 Answer 1

0

Question: Is it possible to include the shown html section in the form submission?
Answer: technically NO!.

But you can create a hidden field or hidden textarea and save the html into that field via JQuery.

11
  • ok, can you elaborate a little?
    – Bart
    Commented Aug 19, 2016 at 10:58
  • I found this thread, but in EE Forms i cannot change the ID for the hidden field and neither can i edit the button to include onclick="submitMyForm()": stackoverflow.com/questions/3103524/…
    – Bart
    Commented Aug 19, 2016 at 11:13
  • Main issue here is that the hidden field has no ID
    – Bart
    Commented Aug 19, 2016 at 11:57
  • Solution is: Create an extra TextArea field from forms module. you will get the default ID for this field. Use CSS and hide TextArea field with "display: none;". Use JQuery to copy the HTML into TextArea field. and its done !! Commented Aug 19, 2016 at 12:29
  • Much appreciated! Too bad cant get it working yet: this is the script: <script type="text/javascript"> $('#new_submission').submit(function() { $('#forms_field_50').val($('#forms_field_44').val()); } </script>
    – Bart
    Commented Aug 19, 2016 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.