Home › Forums › Add-ons › Repeater Field › Dynamically generate subfield content when adding rows to a nested repeater › Reply To: Dynamically generate subfield content when adding rows to a nested repeater
You can only do this in PHP if all of the sub fields will have the same default value. You really don’t need to add anything if all of the sub fields will have the same value.
You can only generate sub fields with different values in PHP if you create enough rows in the repeater to hold those values.
If you want to generate different default values for each row of sub fields then the only way to do that would be to do that using JavaScript/jQuery/Ajax.
There is not much in the way of examples for doing the last.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.