From: R K <lin...@ho...> - 2004-11-03 11:36:11
|
Hi Boris, Is there a way to disable FillInForm globally?. I am having tough time taking care of Config.xml and the model code. Thanks -RK Boris Zentner wrote: > > Hi Veeresh, > > it's not a bug, it is a future. > > I add this sub to the modelcode: > > sub tst { > shift->output( seekrecord => 200 ); > } > > and add a View Default/View/tst.tmpl > <html> > <body> > <form > > [% seekrecord %] > <input value=[% seekrecord %] name="seekrecord" type="hidden" /> > </form> > </body> > </html> > > I reordered it a bit, but without changing the effect ( wo testing ). > > What happened is that: the model data is filled ( you could also write > <modelvar seekrecord> instead of [% seekrecord %] this gives you the > advantage to switch between TT and H:T on the fly ). Then the > fillinform action takes place and overwrite the value=200 part with > whatever value you or the form supply. This may happened implicit. > For example with http://whatever/tst?seekrecord=abc for example. > > You can overcome the effect by > > 1. > using $model->fillinform( seekrecord => 'something' ); in addition > or as a replacement for $model->output. > > 2. > disable the autofillin action for the page: ie fill_in_form="off" > for the page ( Config.xml page section ). > > 3. > let you source as it is, just tell fillin to ignore this field > with $model->ignore_fillinform_fields( qw/seekrecord/ ); > > just choice one of the options that you like most ;-) > > I have not tested the above, but it should work this way or very close > to that. > >> Am Dienstag, 2. November 2004 14:56 schrieb R K: > |