[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] account.html donot show red blank fields.
Bill,
I have entered in the
http://www.minivend.com/pipermail/interchange-users/2000-October/001143.html
and made the changes to new_account.html but when i try to create a new
account a error page appears sayng:
Sorry, there was an error in processing this form action. Please report
the error or try again later. (Can't call method "open_table" on an
undefined value at //usr/lib/interchange/lib/Vend/Data.pm line 872. )
my new_account.html is as:
[comment]
ui_template: Yes
ui_template_name: leftonly
[/comment]
[set component_after][/set]
[set members_only]0[/set]
[set page_banner]Criar um novo usuario[/set]
[set component_hsize]2[/set]
[set hbanner][/set]
[set component_before][/set]
[set hpromo_type]specials[/set]
[set page_title]__COMPANY__ -- Novo usuario[/set]
@_LEFTONLY_TOP_@
<!-- BEGIN CONTENT -->
[if session logged_in][bounce href="[area account]"][/if]
[if !scratch new]
[if session failure]
<P>
<font size="2" __FFACE__><b><font color="#FF0000">[data session
failure]</font></b></font>
[data base=session field=failure value=""]
<P>
[/if]
[else]
[set new][/set]
[/else]
[/if]
<div align="left">
<table width="400" align="center" border="1" cellspacing="0"
cellpadding="0" bordercolordark="#0099FF" bordercolorlight="#0099FF">
[set NewAccount]
[set loginfail][/set]
[tag flag write]userdb[/tag]
[perl global=1]
# copy form vars from cgi to values, as [userdb new_account]
requires
# that most of its vars be passed as values, rather than cgi vars.
::update_values();
# check for empty fields
my @required_fields = (qw/
fname lname address1 city
state zip email phone_day
/);
for (@required_fields) {
if (! $Values->{$_}) {
$Vend::Session->{failure} =
$Vend::Session->{errors}{$_} = "Required field $_ is
empty.";
$Scratch->{loginfail} = 1;
}
}
# attempt to validate the email address if no previous failures
if (! $Scratch->{loginfail} && $Values->{email} !~
/[\040-\176]+\@[-A-Za-z0-9.]+\.[A-Za-z]+/) {
$Vend::Session->{errors}{email} =
$Vend::Session->{failure} = "Badly formatted email address";
$Scratch->{loginfail} = 1;
}
[/perl]
mv_nextpage=new_account
[if scratch loginfail]
[log]new account not created[/log]
[else]
[if type=explicit compare="[userdb function=new_account log=1]"]
[log]new_account create ok![/log]
mv_nextpage=account
[tag export userdb][/tag]
[else]
[log]new_account create failed![/log]
[log interpolate=1][data session failure][/log]
[/else]
[/if]
[/else]
[/if]
[/set]
<P>
[if type=explicit compare="[error all=1 show_var=1 keep=1]"]
<FONT COLOR=RED>One field was either empty, or contained wrong
data.</FONT>
The fields are marked with <FONT COLOR=RED>this color</FONT>.
<P>
[/if]
[if session failure]
The error was:
<FONT COLOR=red>[loc][perl]$Vend::Session->{failure}=~s/\s+$//;
return $Vend::Session->{failure};[/perl][/loc]</FONT>
[data base=session field=failure value=""]
[/if]
<P>
[comment]
[set NewAccount]
[if type=explicit compare="[userdb new_account]"]
mv_nextpage=account
[else]
mv_nextpage=new_account
[/else]
[/if]
[/set]
[/comment]
<FORM ACTION="[process-target]" METHOD=POST>
<INPUT TYPE=hidden NAME=mv_click VALUE=NewAccount>
<INPUT TYPE=hidden NAME=mv_doit VALUE=return>
<INPUT TYPE=hidden NAME=function VALUE=new_account>
<INPUT TYPE=hidden NAME=mv_nextpage VALUE=ord/basket>
<tr>
<td>
<table width="400" border="0"
cellspacing="0" cellpadding="2">
<tr bgcolor="#0099FF">
<td width="81" align="right"
bgcolor="#0099FF"><font size="2" __FFACE__><b><font
color="#FFFFFF">Usuario</font></b></font></td>
<td width="204" bgcolor="#FF9900"
align="left">
<input type="text" NAME=mv_username
VALUE="">
</td>
</tr>
<tr bgcolor="#0099FF">
<td width="81" align="right"
bgcolor="#0099FF">
<font color="#FFFFFF" size="2"
__FFACE__><font color="#000000"><b><font
color="#FFFFFF">Senha</font></b></font></font></td>
<td width="204" bgcolor="#FF9900"
align="left">
<INPUT TYPE=password
NAME=mv_password VALUE="">
</td>
</tr>
<tr bgcolor="#669999">
<td width="81" align="right"
bgcolor="#669999">
<p><font __FFACE__ size="2"><b><font
color="#FFFFFF" size="1">Verificar
Senha </font></b> </font></p>
</td>
<td width="204" align="left">
<INPUT TYPE=password NAME=mv_verify
VALUE="">
<font size="1" __FFACE__>
</font> </td>
</tr>
<tr bgcolor="#999999">
<td width="81"> </td>
<td width="204">
<INPUT TYPE=submit VALUE="Criar
usuario">
</td>
</tr>
<tr bgcolor="#999999">
<td width="81" align="right">
<INPUT TYPE=checkbox
NAME=mv_cookie_password VALUE=1>
</td>
<td width="204"><font __FFACE__
size="1" color="#FFFFFF">Log-
me automaticamente<br>(sets
cookie)</font></td>
</tr>
<tr bgcolor="#999999">
<td width="81" align="right"
colspan="2"> </td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</div>
<p> </p>
<!-- END CONTENT -->
@_LEFTONLY_BOTTOM_@
What is happening?
Thank you in advance,
Marcelo F. De Paula
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users