You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data Something = Something
{ field01 :: Text
, field02 :: Text
}
data StepInstruction = StepInstruction
{ id :: Int
, order :: Int
, description :: Text
}
data Recipe = Recipe
{ id :: Int
, name :: Text
, something :: Something
, instructions :: [StepInstruction]
}
In PHP I could easily submit a form with such data type and get it back in the form of a nested array. Convention for submitting Recipe is as follows:
Currently Query flat and I'd have to do additional parsing on the argument names to get an array of structured arguments.
I'm not sure if this is a standard, but I've also seen the same convention in C#/MVC so I think it would be a good idea to support such feature, because I might want to add repeating "sub forms" to my main form that should be contained in array, and currently there is no good way to do that from what I can see.
Here is also an example of a form that might submit such query:
Similar to what I said in #62, I am not in favor of changing the existing functions because that would break compatibility and also because this is not the most common way of using form inputs, I think.
However, if you want to make a new function that allows rendering/parsing nested data like that, you could send a pull request with new functions and types and if it looks good, it could be merged.
This might be slightly related to #62.
Let's say that I have these data types:
In PHP I could easily submit a form with such data type and get it back in the form of a nested array. Convention for submitting
Recipe
is as follows:Currently
Query
flat and I'd have to do additional parsing on the argument names to get an array of structured arguments.I'm not sure if this is a standard, but I've also seen the same convention in C#/MVC so I think it would be a good idea to support such feature, because I might want to add repeating "sub forms" to my main form that should be contained in array, and currently there is no good way to do that from what I can see.
Here is also an example of a form that might submit such query:
Maybe
QueryItem
should look something like this:The text was updated successfully, but these errors were encountered: