Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Using form checking for new user registration



******    message to minivend-users from Hans-Joachim Leidinger <jojo@buchonline.net>     ******

Brian Wright wrote:
> 
> ******    message to minivend-users from Brian Wright <bdw@Aturna.com>     ******
> 
> First off, I want to thank JoJo and others for helping me out with the database
> write problem.  I now know that it writes to the GDBM file, not the userdb.asc
> file, and I must use a [tag export]userdb userdb.asc[/tag] to get the values
> out.
> 
> Anyway, on my new user sign-up form, I want to ensure that all required fields
> are filled in.  I know that the checkout page sets up an order profile to check
> the form fields, and I have tried to set an mv_order_profile to do form
> checking, but thus far it hasn't worked, with the account being registered with
> key fields missing.  How can I adapt an mv_order_profile to work with a new use
> r signup-form?
> 
> Thanks,
> Brian

Hmmm...i am not sure, if i have you understand right. Did you try to use
[set checkout_profile] ...[/set] in your new_account page? What happen,
if you submit the form? Hmmm...maybe the another solution can help you.

1. change or insert a line in you new_account.html with

[if scratch usermsg]<BR><BR><FONT COLOR="RED">[L]ERROR[/L]:</FONT><BR>
[scratch usermsg]<BR>
[/if]</B>


<INPUT TYPE=hidden NAME="mv_nextpage" VALUE="newaccount">
                                         ^^^^^^^^^^^^^^
.
.
Your mothers name:
<INPUT TYPE="hidden" NAME="mother" VALUE="" size=21>
	

2. build a page "newaccount.html" with such kind of codes like

[perl arg=scratch]
        $Safe{'scratch'}->{'usermsg'} = '';
        return '';
[/perl]


[if !value mother]
[perl arg=scratch]
        $Safe{'scratch'}->{'usermsg'} = 'Please! What is your mothers
name?';
        return '';
[/perl]
[/if]


[tag op=header interpolate=1]
Status: 302 moved
Content-type: text/html
Location: [area href="new_account" secure=1]
[/tag]

Short description:
If you submit the form (new_account), the next page is "newaccount".
If any field is empty, [scratch usermsg] is not empty.
At the end of "newaccount", there is a redirection command to go back to
the page "new_account".
In "new_account" if [scratch usermsg] is not empty, you can see what is
going wrong.

I have not tested this codes. I use the same principles wiht success. I
hope this help!

Regards,

	Joachim

-- 
-------------Hans-Joachim Leidinger---------------------

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: