Changes between Initial Version and Version 1 of Ticket #31295, comment 13
- Timestamp:
- Feb 27, 2020, 11:16:45 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31295, comment 13
initial v1 9 9 * defer the presence of the {{{required}}} attribute after the iteration for the <options>. During this iteration, we store the fact that the first option allows or not the {{{required}}} attribute. After the rendering of the options, we put afterwards (or not) the {{{required}}} attribute. Maybe with a placeholder replaced by a regexp? I find this quite ugly. 10 10 * Maybe the ModelChoiceIterator may cache it's first value? It should not take a lot of memory. I don't think it will work because I assume that, for efficiency, multiple rows are fetched from the database, if you want to cache the first value for an ulterior iteration, you also have to cache the rest of the rows until <options> are iterated. 11 * ... or choose the lesser evil between "invalid HTML", "double query to the database" and "high memory usage".