What I do is,
========= Perl=========
get '/edit/:id' => sub {
template 'customer/edit', { create=>0,
customer => rset('Customer')->search_rs({customerid=>route_parameters->get('id')})
};
};
============HTML====================
....
<% cus = customer.next %>
<%IF create ==1%>
<form action="/edit/<%cus.customerid%>" method="post">
<%ELSE%>
<form action="/edit/<%cus.customerid%>/<%inv.invid%>" method="put">
<%END%>
....
<div class="col-2"><input name="datecreated" type="date" class="form-control" id="datecreated" aria-describedby="dateHelp" value="<%date.format(inv.datecreated)%>">  </div>
....
====================END=====================

Will this help in your situation?

On Thu, Jan 28, 2021 at 10:09 PM Morse, Richard E.,MGH <REMORSE@mgh.harvard.edu> wrote:
Thanks, but for a variety of reasons, I'm trying to minimize the amount of client-side Javascript. (Among other reasons, I may still need to support IE8 (or, rather, IE11 in IE8 compatibility mode).)

Ricky

________________________________________
From: dancer-users <dancer-users-bounces@lists.preshweb.co.uk> on behalf of Andrew Solomon <andrew@geekuni.com>
Sent: Thursday, January 28, 2021 11:07 AM
To: Perl Dancer users mailing list
Subject: Re: [dancer-users] Form modules?

I would approach this by:
* making sure all the html fields have an id
* on page load, use jQuery to do a REST call back to the server to work out what to stick in these fields

Does that make sense?
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

_______________________________________________
dancer-users mailing list
dancer-users@lists.preshweb.co.uk
https://lists.preshweb.co.uk/mailman/listinfo/dancer-users


--
https://www.facebook.com/vijayvithal.jahagirdar
https://twitter.com/jahagirdar_vs
http://democracies-janitor.blogspot.in/