[web-devel] Question about changes in Yesod.Form.Fields
Michael Litchard
michael at schmong.org
Thu Jul 28 01:26:46 CEST 2011
Upon further investigation, I'm believe that the ability to have a
multi-select field in 0.2.0.1 is non-existent. 0.2.0 builds from cabal
so I think I will just use that until I need something else.
On Wed, Jul 27, 2011 at 3:59 PM, Michael Litchard <michael at schmong.org> wrote:
> What I mean to say is, I'm assuming selectField can now have the
> option to be a multi-select. I just don't know how to do that with the
> new interface.
>
> On Wed, Jul 27, 2011 at 3:57 PM, Michael Litchard <michael at schmong.org> wrote:
>> Building Aframe-0.0.1...
>> [5 of 7] Compiling Handler.SSLvpn ( Handler/SSLvpn.hs,
>> dist/build/Aframe/Aframe-tmp/Handler/SSLvpn.o )
>>
>> Handler/SSLvpn.hs:44:14: Not in scope: `multiSelectField'
>>
>> multiSelectField is no longer a function in 0.2.0.1
>>
>>
>> Here's the change I am referring to
>>
>> selectField :: (Eq a, Monad monad, RenderMessage master FormMessage)
>> => [(Text, a)] -> Field (GGWidget master (GGHandler sub master monad)
>> ()) FormMessage a
>>
>> I have no idea what to make of that or how to use it.
>>
>> On Wed, Jul 27, 2011 at 3:54 PM, David McBride <dmcbride at neondsl.com> wrote:
>>> Seems to work fine for me, what error are you getting, and what have
>>> you set the variables servers and tests to?
>>>
>>> On Wed, Jul 27, 2011 at 6:44 PM, Michael Litchard <michael at schmong.org> wrote:
>>>> I appreciate the additional functionality that allows multi select
>>>> fields. The interface to selectField has changed however. The
>>>> following code used to work. I cannot make sense of the changes, and
>>>> couldn't find any use examples in the source. Could someone lend a
>>>> hand and tell me how the following should be re-written?
>>>>
>>>>
>>>> sslvpnForm = fixType $ runFormPost $ renderDivs $ pure (,)
>>>> <*> areq (multiSelectField servers) "Pick some servers" Nothing
>>>> <*> areq (selectField tests) "Pick a test" Nothing
>>>>
>>>> _______________________________________________
>>>> web-devel mailing list
>>>> web-devel at haskell.org
>>>> http://www.haskell.org/mailman/listinfo/web-devel
>>>>
>>>
>>
>
More information about the web-devel
mailing list