I think there is some confusion about how Widgets are used for Yesod Forms.
Yesod Forms (I'll just use capital 'F' when I mean a "Yesod Form") hare pretty fancy. Some might say... TOO fancy. They take care of a lot of things: 1. Defining the Haskell data that comes out of them 2. Defining what the body of the <form> looks like 3. Defining how to validate the data they should accept One thing they explicitly do NOT do is generate a <form>. That's because they are used in a lot of different ways (because of how fancy they are). If a web designer wants to include a Form in a template, they must write it like this: <form enctype=#{enctype} method=... action=...> ^{formFooBar} In other words, they have to explicitly include a <form> element. Conversely, someone creating a custom Form should NOT add a <form> element to the Form's Widget. In the example code above, "formFooBar" is a Widget that comes from the Form. Note that like all Widgets, it is created in Haskell-land. Perhaps some day it can be generated automatically based on its name, but for now it is not, and a Haskeller has to provide it to the web designer. (Of course, the Haskeller and the web designer could be the same person...)
signature.asc
Description: Digital signature
_______________________________________________ Dev mailing list Dev@lists.snowdrift.coop https://lists.snowdrift.coop/mailman/listinfo/dev