[Haskell-beginners] Options for creating a multiple select form via Yesod

Michael Snoyman michael at snoyman.com
Sat Jun 11 20:03:30 CEST 2011


The best way for code contributions in general is to submit a pull
request on Github. If that's a problem, sending a patch via email
works as well (either directly to me or to web-devel).

Michael

On Sat, Jun 11, 2011 at 1:14 AM, Michael Litchard <michael at schmong.org> wrote:
> Hey! I just added multiSelectField to the Forms library. I'm only
> getting the first value selected, but I think that's because of how
> I'm using multiSelecrField. I'm going to try to change the client code
> to fix this. I'll let you know how it goes. when I get a
> maybeMultiSelectField added I'll show you what I have. What would be
> the best way to submit this?
>
> On Thu, Jun 9, 2011 at 10:05 PM, Michael Snoyman <michael at snoyman.com> wrote:
>> Hi Michael,
>>
>> There's nothing jQuery or Javascript specific about a multi-select
>> field: it's just a normal select field with a "multiple" attribute. I
>> would recommend taking the selectField code from yesod-form and
>> modifying it to be multi-select. I'll likely do this myself
>> eventually, but it could be a good learning experience in Yesod (and a
>> great introduction to contributing to the framework if you're so
>> inclined).
>>
>> Michael
>>
>> On Thu, Jun 9, 2011 at 8:29 PM, Michael Litchard <michael at schmong.org> wrote:
>>> I'm trying to create a multiple select form, as illustrated on the following:
>>> http://api.jquery.com/selected-selector/
>>>
>>> Here's the options I see possible:
>>>
>>> (1) Write a jQuery widget.
>>> (2) Use plain javascript via Julius
>>> (3) Use the low-level functions in Yesod.Form to write a widget
>>> (4) Use a pre-existing function that does what I need, but am not
>>> aware of this functionality
>>>
>>> (1) has appeal as it looks like something small I can contribute to
>>> the project. It will take me some extra time to figure out the
>>> details. But, I had a look at the other jQuery widgets and they seem
>>> to provide an approachable model to follow.
>>>
>>> (2) This looks like the most straight-forward approach. I'm just
>>> learning javascript so would have to figure out how to capture values
>>> in Haskell from the form.
>>>
>>> (3) This looks like the most difficult way. I don't think I know
>>> enough about the low-level functions in Yesod.Form to be able to
>>> accomplish this in a timely manner.
>>>
>>> (4) This is the best scenario. There's already a way to do this right
>>> now, and I just haven't identified it. If this is the case, I would
>>> appreciate being pointed in the right direction.
>>>
>>> Until informed otherwise, I'm evaluating options 1 and 2. All feedback
>>> welcomed. Thanks to all who made Yesod possible.
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> Beginners at haskell.org
>>> http://www.haskell.org/mailman/listinfo/beginners
>>>
>>
>



More information about the Beginners mailing list