PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / trunk
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder vtrunk
6.2.15 6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 All 197 releases
← All changes | app/Services/FormBuilder/Components.php +6 -0 6.2.7 → trunk View file →
@@ -83,8 +83,14 @@
83 83 */
84 84 public function sort($sortBy = 'index')
85 85 {
86 86 foreach ($this->items as $group => &$items) {
87 + // NOTE: usort renumbers the groups 0..n, which is deliberate - the
88 + // editor receives these as JSON and editor-inserter.vue declares
89 + // generalMockList/advancedMockList/containerMockList as Array props,
90 + // so they must not become JSON objects. Consumers that need to look
91 + // an element up by name must re-key it themselves (see
92 + // AiFormBuilder::getDefaultFields).
87 93 usort($items, function ($a, $b) {
88 94 if (@$a['index'] == @$b['index']) {
89 95 return 0;
90 96 }