[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] submitting and parsing form data
From:       Daniel Bretoi <daniel () vinq ! com>
Date:       2008-03-10 18:14:24
Message-ID: 03D6164D-34D6-48CE-A9FF-65F0453BF58C () vinq ! com
[Download RAW message or body]

Thank you.

I had written a similar function already actually. Just wanted to make  
sure I wasn't missing anything obvious, or worse, was doing something  
wrong :)




On Mar 10, 2008, at 11:10 AM, William Cox wrote:

> i have a quick loop that does this to one level only
>
> foreach ( keys %ARGS ) {
>    /([\d\w]+) \[ ([\d\w]+) \]/x or next;
>    $ARGS{$1}{$2} = delete $ARGS{$_};
> }
>
> does what i need and it's quick
>
> On Mon, Mar 10, 2008 at 12:01 PM, Daniel Bretoi <daniel@vinq.com>  
> wrote:
>>
>> On Mar 10, 2008, at 8:58 AM, Hans Dieter Pearcey wrote:
>>
>>> On Mon, Mar 10, 2008 at 08:49:56AM -0700, Daniel Bretoi wrote:
>>>> I have something like this:
>>>>
>>>> <form>
>>>> <input type="radio" name="user[name]" value="">
>>>> <input type="radio" name="user[email]" value="">
>>>> </form>
>>>>
>>>> And I was hoping to see
>>>>
>>>> $ARGS = {
>>>>   'user' => {
>>>>       'name' => 'daniel',
>>>>       'email' => 'nnn@blah.com',
>>>>    }
>>>> };
>>>
>>> That's not how forms work; Rails isn't the web.  You'll need to do
>>> it yourself.
>>> Look at e.g.  CGI::Expand and Catalyst::Plugin::Params::Nested.
>>
>> understood. hence the "hoping" :)
>>
>>
>>>
>>>
>>> Adding the foo[bar] syntax to CGI::Expand would be a pretty nice
>>> patch, if you
>>> wanted to send it in -- I'm sure you're not the only one who'd like
>>> to use
>>> that.
>>>
>>
>> thank you.
>>
>>
>>
>>> hdp.
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Mason-users mailing list
>>> Mason-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mason-users
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Mason-users mailing list
>> Mason-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mason-users
>>
>
>
>
> -- 
> William Cox
>
> email: william@my-dimension.com
> blog: http://my-dimension.com/
> music: http://www.last.fm/user/mydimension/
> photos: http://flickr.com/photos/mydimension/
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic