From d234ce1858b388bde06fca95d7266ac86f2ca0cc Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Mon, 24 Apr 2006 22:37:46 +0000 Subject: [PATCH] Fixed a bug which caused the phone field to display "-defaultValue". This is a still a bug in WebGUI core. The fix involved moving -defaultValue in front of -value in the phone form field of the checkoutForm method. --- lib/WebGUI/Commerce/Payment/ITransact.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Commerce/Payment/ITransact.pm b/lib/WebGUI/Commerce/Payment/ITransact.pm index eecf4b0ea..df00690ee 100644 --- a/lib/WebGUI/Commerce/Payment/ITransact.pm +++ b/lib/WebGUI/Commerce/Payment/ITransact.pm @@ -413,11 +413,12 @@ sub checkoutForm { -defaultValue=>[$u->profileField("homeCountry")], -options=>\%countries ); + #For some odd reason, defaultValue needs to come before value here or value displays the text "-defaultValue". Bug is reported. $f->phone( -name=>"phone", -label=>$i18n->get("phone"), + -defaultValue=>$u->profileField("homePhone"), -value=>$self->session->form->process("phone"), - -defaultValue=>$u->profileField("homePhone") ); $f->email( -name => 'email',