Forum
perch add-on building: repeat regions
I need to do 2 things:
- upload multiple images for a store
- allow user to add multiple phone numbers for a store
is this something I can user to save in 1 table with json encoded or I need multiple tables to save this information.
How would I design admin so that it allows multiple field inputs?
Would you not use a repeater?
Drew, you are absolutely right, and you actually saved me from a lot of work that I was headed in wrong direction.
I realised that I was suppose to define only static fields in edit.post.php and edit.pre.php. I was doing all fields :-(
repeater worked fine, except the images are not selected by default , here is the image of before saving https://snag.gy/B7Itj.jpg
after saving screenshot of db and admin area https://snag.gy/fDdnw.jpg
you can see that the address is also saved in db, but they are not populated with data from db at the time of edit
Here is how my edit.post.php looks like
here is edit.pre.php file
Have you checked your debug?
Debug log seems fine. can't see any error.
Please see attached. https://snag.gy/CM3xY.jpg
I can see the information in db, its just not pre-populating the dynamic fields from db on edit screen
Ok. Let me know what you find.
I can't find anything. I am hoping you can look at above code for 2 files and let me know why dynamic fields are not pre-populating
It's probably your class files, but this isn't something I can do for you.