From: - 2004-02-09 05:54:39
|
Bill, This confusing behavior is probably due to PageKit's use of HTML::FillInForm. This module "conveniently" fills in default values for form fields using values of the same name passed in on HTTP request inputs. I have often found it messing up my forms when I wanted some special control. (And yes, it took me a while to figure out what the heck was going on.) You can turn off this behavior for specific pages by adding to the <PAGES> section of Config/Config.xml. For example: <PAGES> <!-- Avoid use of HTML::FillInForm --> <PAGE id="/foo/bar" fill_in_form="no"/> <!-- end Avoid use of HTML::FillInForm --> </PAGES> Hope that helps. Good luck, shimon. On Sun, Feb 08, 2004 at 09:29:51PM -0800, Bill Karwin wrote: > Hi folks, it's been a while since I posted to this list. > I'm seeing some strange behavior, and I'm trying to debug. > > <FORM ACTION='<PKIT_SELFURL>' METHOD="GET"> > <MODEL_IF NAME="RESOURCE_ID"> > <INPUT TYPE="HIDDEN" NAME="resuorce_id" VALUE='<MODEL_VAR > NAME="RESOURCE_ID">'> > <INPUT TYPE="HIDDEN" NAME="resource_id" VALUE='<MODEL_VAR > NAME="RESOURCE_ID">'> > </MODEL_IF> > > <form ACTION='http://...(correct url)...' METHOD="GET"> > <input value="656" name="resuorce_id" type="HIDDEN"> > <input value="" name="resource_id" type="HIDDEN"> > > Why does MODEL_VAR interpret the value of the variable correctly when > the name of the form field is different from the name of the var, but > the variable is interpreted as a blank value when the names are the same? > > This markup is in the template of a sub-component, but I'm setting the > RESOURCE_ID output in the model code for the page handler. It shouldn't > matter, and in fact I see that the correct value of 656 is communicated > to the component view. It's just that it doesn't like me naming the > form field "resource_id". > > I also tried changing the value of the model var to "BASE_RESOURCE_ID" > and the same behavior persists; the value is blank when the form field > is "resource_id" and the value is correct when the form field is > "resuorce_id" or anything else besides "resource_id". > > Regards, > Bill Karwin > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users |