-
MODX Staff
- 12,272 Posts
I think the best way is to just try it and see if you start making headway. If you run into an unexpected problem then revisit here for support.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Thanks for the reply, rthrash.
As I found out with my earlier bouts with ditto and eform, this too was surprisingly easy to get to work. Just had to call [[ditto]] in the middle of the eform and have the input type="checkbox" name="[+id+]" value="[+pagetitle+]" eform="[+pagetitle+]::1"/ tag in the product documents. First I tried it with [!ditto!] but that only displayed the code, didn’t actually do anything.
Now I’m off to tweak it, will let you know how it goes.
Everything is going well except for one thing: how do I keep the right hand side (product list) checkboxes checked if the user doesn’t fill a required field and the form displays an error message? All the info in the form itself (left hand side) stays there but the checkboxes become unchecked.
I think u need eform="[+pagetitle+]::1" only with first item in the checkboxes.
Also name="" should be same per set.
Hint: use tplFirst for the different first item.
zi, thanks for your help, I got it to work. But (as always when you are learning something new) another question arises:
I also have a dropdown menu next to the checkboxes (the checkbox selects the product, the dropdown allows the user to order multiple articles of the product. Right now I’ve been able to get it to display it in the report like this:
Product 1, Product 2, Product 3, # of articles for Product 1, # of articles for Product 2, # of articles for Product 3
But I’d like to get it to display like this:
Product 1: # of articles, Product 2: # of articles.
Can this be done?