Can user add extra field in Squiz Matrix Custom Form?


(Ryan Archer) #1

Is it possible to create a custom form in Squiz whereby a user can dynamically generate an additional text input field should they need to? Obviously by using some sort of script (that manipulates the DOM)?

This is so they can add extra details should the need arise.

 

I kinda get the feeling that this may not be possible due to the nature of Squiz and the dependance on keyword replacements for manipulating the form information. Also the way assets need to be generated within the system first.

 

But if anyone out there in the Squiz community has any experience with this kind of thing, please share if you can.

 

Thanks


(Nic Hubbard) #2

I have done this quite a bit.

 

You just need to create the additional fields, and have them hidden in the form. Then, based on your conditions, you would then show that field.


(Ryan Archer) #3

Ahh I get you Nic. I have done this before with JavaScript and a show/hide toggle.

Shame as that was not really what I was looking for. Was seeking a way whereby the user adds as many extra fields as they need to.

 

The solution proposed here is still 'locked in' by the form developer and I have to have an educated guess at how many input fields they need (and there is still a hard limit) - not to mention the additional code that's probably necessary within the HTML.

That is unless I can write some script to add in the HTML dynamically and increment the ID assigned to it...


(Bart Banda) #4

Ive done it in the past where the dynamic input fields are not actually matrix form fields in the backend, but more like placeholders. Then when the user hits submit the JS gathers all of those input values and sticks them into a single textarea field which is a custom form field and separates each value with a pipe (|) or something. You can then list each value separately on the thank you page or in emails using keyword modifiers.