Jonathan Lahijani Posted Saturday at 04:53 PM Posted Saturday at 04:53 PM Let's say you have a repeater field. ProcessWire renders it in the default ProcessWire way in the page editor, which is fine, however there are times where you may want to render a particular repeater field in a more streamlined way, like a table, while maintaining the ability for the user to make changes to field values of the respective repeater items. The problem with this however if that you must be very careful because if you do not represent a field of that repeater (and represent it correctly with the correct form "name"), then ProcessWire will wipe out the data because it expects it to exist when saving!!! This includes the "native" fields for a repeater item (which are "loaded", "sort" and "publish"). THOSE MUST ALSO BE REPRESENTED! For fields in your repeater that are hidden however, they do not need to be represented, so you can ignore rendering those. You have to be very careful here because you may one day decide to add a new field to a repeater and keep it as "Open", and forget this requirement and not add it to the your custom renderer. Then if you wrote data to the field in some way, and then a user went to edit a page that contains that repeater field and they save, your data will get wiped out! 1
horst Posted yesterday at 02:42 PM Posted yesterday at 02:42 PM Many thanks for this useful tipp, ... ... & congrats to this "lucky number post"! 😁 1 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now