[dancer-users] updating a form

James Baer jamesfbaer at gmail.com
Mon Feb 10 14:00:06 GMT 2014


<input type="hidden" > is what you want.

You could also change your action and route to pass <form method="post"
action="/edit/[% data.id %]">


On Mon, Feb 10, 2014 at 8:58 AM, Daniel Perrett <dperrett at cambridge.org>wrote:

> Remove  disabled="disabled" and hide from the user with CSS. If it's
> disabled, I believe it won't be submitted.
>
> Daniel
>
>
>
> From:        Gert van Oss <gertvanoss at me.com>
> To:        Perl Dancer users mailing list <dancer-users at dancer.pm>,
> Date:        10/02/2014 13:53
> Subject:        Re: [dancer-users] updating a form
> Sent by:        dancer-users-bounces at dancer.pm
> ------------------------------
>
>
>
>
> On 10 Feb 2014, at 14:48, Stefan Hornburg (Racke) <*racke at linuxia.de*<racke at linuxia.de>>
> wrote:
>
> On 02/10/2014 02:37 PM, Gert van Oss wrote:
> Hi,
>
> I'm trying to build a small app to comment on images. Probably I'm almost
> there but currently stuck with updating a 'file.yml' by a html-form.
>
> I've made two routes (shown below) "get '/:id/edit' for showing the form
> with the particular image to comment on. When hitting save the 'post
> '/edit' will be called. My problem is that the post route doesn't have the
> $id initialised. Is there someone around who can tell me how to solve this
> or point to me what I'm doing wrong?
>
>
> Do you have a hidden from field in your form which passes the id to the
> post route?
>
> Regards
> Racke
>
> I don't have a hidden field. I tried but then still wasn't successful.
> (see below.. I skipped some fields)
>
> <form method="post" action="/edit">
>
> <input type="text" name="id" id="id" value="[% data.id %]"
> disabled="disabled"/>
>
> <textarea name="description" rows="20" cols="20" id="Description">[%
> data.description %]</textarea>
>
> <input type="submit" name="submit" value="Save" class="submit-button" />
> </form>
>
> _________________ _________________________ _____
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20140210/4e907100/attachment-0001.html>


More information about the dancer-users mailing list