(CLOSED)"Email already exists" - then clears others fields

Moderator: crythias

Locked
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

(CLOSED)"Email already exists" - then clears others fields

Post by morecw »

This is potentially a very annoying problem for our customers:

We have recently added some new fields and it works fine, as long as they enter a unique email address. If they enter an address that exists already in the database then it clears all the other fields. The customer then has to re-enter all the fields again before they can try a different address!! Except for "Title", all the fields that are cleared the customer ones I recently added.

Could someone please help me fix this as I am about to receive a ton of complaints :(

I have upload CustomerLogin.dtl just in case it's due to something I've done wrong
sshot-1.png
You do not have the required permissions to view the files attached to this post.
Last edited by morecw on 31 Aug 2012, 15:02, edited 2 times in total.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "Email address already exists" - then clears others fiel

Post by crythias »

What's the problem? If that email already exists, point them to password recovery instead.

OK, not the answer you want. Basically, and I'm guessing here, you may want to look at the code for the fields that fill. Probably that value=$QData{} thing needs to be there.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: "Email address already exists" - then clears others fiel

Post by morecw »

crythias wrote:What's the problem? If that email already exists, point them to password recovery instead.

OK, not the answer you want. Basically, and I'm guessing here, you may want to look at the code for the fields that fill. Probably that value=$QData{} thing needs to be there.
The problem is we have hundreds of school users who have very similar email addresses so there will naturally be a bit of user entry mistakes. I don't want to force them to reenter pratically the whole form again because of it. If the Firstname and Surname fields don't clear themselves on this even then it should be possible to do the same for the rest.

I've tried what you suggested for $QData without success. Any other ideas?

Code: Select all

<!-- dtl:block:CreateAccount -->
            <div id="Signup">
                <a href="#Login" class="InlineNavigation">&larr; $Text{"Back"}</a>
                <h2>$Text{"Create Account"}</h2>
                <p>$Text{"Please fill out this form to receive login credentials."}</p>
                <form class="Floating Validate" action="$Env{"CGIHandle"}" method="post" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="Action" value="CustomerCreateAccount"/>
                    <input type="hidden" name="Lang" value="$Env{"UserLanguage"}"/>
                    
#############################
### input Title of the customer                     
                    <div>
                        <label for="Title">$Text{"Title{CustomerUser}"}</label>
                        <input title="$Text{"How we should address you"}" type="text" name="Title"  id="Title" maxlength="50" value="$QData{"UserTitle"}"/>
                    </div>
#############################


#############################
### input First name of the customer                       
                    <div class="NewLine">
                        <label class="Mandatory" for="FirstName"><span class="Marker">*</span> $Text{"Firstname{CustomerUser}"}</label>
                        <input title="$Text{"Your First Name"}" name="Firstname" type="text" id="FirstName" maxlength="100" value="$QData{"UserFirstname"}" class="W50pc Validate_Required"/>
                        <div id="FirstNameError" class="TooltipErrorMessage"><p>$Text{"Please supply a first name"}</p></div>
                    </div>
#############################
                   
                    
#############################
### input Surname name of the customer  
                    <div class="NewLine">
                        <label class="Mandatory" for="LastName"><span class="Marker">*</span> $Text{"Lastname{CustomerUser}"}</label>
                        <input title="$Text{"Your Last Name"}" name="Lastname" type="text" id="LastName" maxlength="100" value="$QData{"UserLastname"}" class="W50pc Validate_Required"/>
                        <div id="LastNameError" class="TooltipErrorMessage"><p>$Text{"Please supply a last name"}</p></div>
                    </div>
#############################                    
                    
                    
#############################
### input street of School or Business                   
                     <div class="NewLine">
                        <label class="Mandatory" for="Street"><span class="Marker">*</span> $Text{"Street{CustomerUser}"}</label>
                        <input title="$Text{"Street"}" name="Street" type="text" id="Street" maxlength="100" value="$QData{"UserStreet"}" class="W50pc Validate_Required"/>
                        <div id="StreetError" class="TooltipErrorMessage"><p>$Text{"Please provide your street address"}</p></div>
                    </div>                   
############################   


#############################
### input city of School or Business                   
                     <div class="NewLine">
                        <label class="Mandatory" for="City"><span class="Marker">*</span> $Text{"City{CustomerUser}"}</label>
                        <input title="$Text{"City"}" name="City" type="text" id="City" maxlength="100" value="$QData{"UserCity"}" class="W50pc Validate_Required"/>
                        <div id="CityError" class="TooltipErrorMessage"><p>$Text{"Please provide your city"}</p></div>
                    </div>                   
############################       
               
                            
#############################
### input Zip code of School or Business                   
                     <div class="NewLine">
                        <label class="Mandatory" for="Zip"><span class="Marker">*</span> $Text{"Zip{CustomerUser}"}</label>
                        <input title="$Text{"Zip"}" name="Zip" type="text" id="Zip" maxlength="100" value="$QData{"UserZip"}" class="W50pc Validate_Required"/>
                        <div id="ZipError" class="TooltipErrorMessage"><p>$Text{"Please provide your zip code"}</p></div>
                    </div>                   
############################                                         
               
                  
#############################
### input Name of School or Business into the Comments field               
                     <div class="NewLine">
                        <label class="Mandatory" for="Comment"><span class="Marker">*</span> $Text{"Name of School or Business{CustomerUser}"}</label>
                        <input title="$Text{"Name of School or Business"}" name="Comment" type="text" id="Comment" maxlength="100" value="$QData{"UserComment"}" class="W50pc Validate_Required"/>
                        <div id="SchulenameCodeError" class="TooltipErrorMessage"><p>$Text{"Please provide the name of your School or Business"}</p></div>
                    </div>                   
############################


#############################
### input Customer ID  (not mandatory)
                    <div>
                        <label for="Title">$Text{"Customer ID if known{CustomerUser}"}</label>
                        <input title="$Text{"Customer ID if known"}" type="text" name="CustomerID"  id="CustomerID" maxlength="50" value="$QData{"UserCustomerID"}"/>
                        <div id="CustomerIDError" class="TooltipErrorMessage"><p>$Text{"Customer ID if known"}</p></div>
                    </div>                                                               
############################   


#############################
### input phone number                    
                     <div class="NewLine">
                        <label class="Mandatory" for="Phone"><span class="Marker">*</span> $Text{"Phone{CustomerUser}"}</label>
                        <input title="$Text{"Phone"}" name="Phone" type="text" id="Phone" maxlength="100" value="$QData{"UserPhone"}" class="W50pc Validate_Required"/>
                        <div id="PhoneError" class="TooltipErrorMessage"><p>$Text{"Please provide your phone number"}</p></div>
                    </div>                   
############################


#############################
### input Email address            
                    <div class="NewLine">
                        <label class="Mandatory" for="Email"><span class="Marker">*</span> $Text{"Email{CustomerUser}"}</label>
                        <input title="$Text{"Your email address (this will become your username)"}" name="Email" type="text" id="Email" maxlength="150" value="$QData{"UserEmail"}" class="W100pc Validate_Required Validate_Email"/>
                        <div id="EmailError" class="TooltipErrorMessage"><p>$Text{"Please supply a"} $Text{"Email{CustomerUser}"}</p></div>
                    </div>
#############################
                   
  
                   
                    <div class="NewLine">
                        <button id="CreateAccount" type="submit" value="$Text{"Create"}">$Text{"Create"}</button>
                    </div>
                    <div class="Clear"></div>
                </form>
            </div>
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "Email address already exists" - then clears others fiel

Post by crythias »

I don't think there's a good answer. If the email already exists, what do you do on a valid email-already-exists issue?
How many complaints are you expecting with respect to this? If there's that many potential collisions, ... Who doesn't know their own email address?
There's another point of view that says you should know the other information, and not force them to enter it.

I'm not really seeing this as a big problem unless you've already helped them by creating them as a customer. Why would they have collisions? Siblings? They already should be acutely aware of the difference between their email addresses, as you won't be the first collision.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: "Email address already exists" - then clears others fiel

Post by morecw »

ok there's no point continuing this one any further but I have a different question concerning something else to do with the form which I'll write on a different post. Many thanks
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
Locked