Hi,
this code in my registration-form, send one message (Bitte geben Sie...) if there are no input or the wrong input.
I want to messages for the different things (greyhead give me a code for my other form - thanks a lot).
Now I want to integrate this code in my registration form - but I am not good in coding đ
What ist wrong at this code?
this is the result.
http://www.formfalt.net/email.gif
Regards
Mac
this code in my registration-form, send one message (Bitte geben Sie...) if there are no input or the wrong input.
<div class="form_item"><div class="form_element cf_textbox"><label class="cf_label">E-Mail*</label><input class="cf_inputbox required" maxlength="150" size="30" id="text_3" name="text_3" title="Bitte geben Sie Ihre E-Mail Adresse ein. "type="text"></div>
<div class="clear">Â </div></div>
I want to messages for the different things (greyhead give me a code for my other form - thanks a lot).
Now I want to integrate this code in my registration form - but I am not good in coding đ
What ist wrong at this code?
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label">E-Mail*</label>
<input class="cf_inputbox" maxlength="150" size="30"
id="text_3" name="text_3" "type="text">
</div>
<div style='display:none;color:#ed6e00;' id='advice-required-email'>Dies ist ein Pflichtfeld</div>
<div style='display:none;color:#ed6e00;' id='advice-validate-email-email'>Bitte geben Sie Ihre vollstÀndige E-Mail Adresse ein.</div>
<div class="clear">Â </div>
</div>
this is the result.
http://www.formfalt.net/email.gif
Regards
Mac
Hi mac,
I see the same code but the 2nd one is formatted and have 2 useless lines, so simply replace the bottom code with the top one!
Cheers
Max
I see the same code but the 2nd one is formatted and have 2 useless lines, so simply replace the bottom code with the top one!
Cheers
Max
Hi,
this code in another form works right.
I want the english message translate to german
http://www.formfalt.net/emailmessages.jpg
Regards
Mac
this code in another form works right.
<input maxlength="60" size="40" id='email' name="EMAIL" class="standard validate-email required" />
<div style='display:none;color:#ed6e00;' id='advice-required-email'>Dies ist ein Pflichtfeld</div>
<div style='display:none;color:#ed6e00;' id='advice-validate-email-email'>Bitte geben Sie Ihre vollstÀndige E-Mail Adresse ein.</div>
I want the english message translate to german
http://www.formfalt.net/emailmessages.jpg
Regards
Mac
Hi mac,
No . . . ignore Max (just this once) - the two 'useless' lines are the ones that give you the messages you need.
You have a misplaced " in here
And you need to change the id of the mesage fields to match the name of the field you are trying to validate like this id='advice-required-text_3'
Make both changes and try
Bob
No . . . ignore Max (just this once) - the two 'useless' lines are the ones that give you the messages you need.
You have a misplaced " in here
title="Bitte geben Sie Ihre E-Mail Adresse ein. "type="text">
that shound be . . .ein." text=" . . . And you need to change the id of the mesage fields to match the name of the field you are trying to validate like this id='advice-required-text_3'
Make both changes and try
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label">E-Mail*</label>
<input class="cf_inputbox required" maxlength="150" size="30" id="text_3" name="text_3" type="text"></div>
</div>
<div style='display:none;color:#ed6e00;' id='advice-required-text_3'>Dies ist ein Pflichtfeld</div>
<div style='display:none;color:#ed6e00;' id='advice-validate-email-text_3>Bitte geben Sie Ihre vollstÀndige E-Mail Adresse ein.</div>
<div class="clear">Â </div>
</div>
Bob
Hi Bob,
thanks!
finally it works - I tried thousand times :wink: I think there was a cache problem.
How can I integrate the class
.validation-advice
in this code?
Regards
Mac
[attachment=0]emailcode.jpg[/attachment]
thanks!
finally it works - I tried thousand times :wink: I think there was a cache problem.
How can I integrate the class
.validation-advice
in this code?
<div style='display:none;color:#ed6e00;' id='advice-validate-email-text_3'>Bitte geben Sie Ihre vollstÀndige E-Mail Adresse ein.</div>
I doen't find the solution đ¶ Regards
Mac
[attachment=0]emailcode.jpg[/attachment]
Hi mac,
You can just add the script in the Form HTML, or more elegantly:
Bob
You can just add the script in the Form HTML, or more elegantly:
<?php
$doc = & JFactory::getDocument();
$doc->addScriptDeclaration(".validation-advice {
color:red;
font-weight:bold;
}");
Bob
Hi Bob,
when I put this code
in the html code field, or your php instruction in the 'Server Side Validation Code'
both doesn't work. Is my way wrong?
Regards
Mac
when I put this code
<div style='display:none;color:#ed6e00;' class='validation-advice' id='advice-required-text_3'>Dies ist ein Pflichtfeld!</div>
in the html code field, or your php instruction in the 'Server Side Validation Code'
both doesn't work. Is my way wrong?
Regards
Mac
Hi mac,
Sorry, I don't understand what you are doing or what your question is.
Bob
Sorry, I don't understand what you are doing or what your question is.
Bob
Hi Bob,
I want that the error message 'Dies ist ein Pflichtfeld' appears in the same style as 'Bitte geben Sie Ihren Firmenname an' how is shown in the 'title' tag.
This title tag has the class .validation-advice.
I did not now how I must combine in the existing code. I tried it so:
but this is wrong.
You give me a better solution, and I put your code in the field 'Server Side Validation Code', I thought that is the correct position!?
Mac
I want that the error message 'Dies ist ein Pflichtfeld' appears in the same style as 'Bitte geben Sie Ihren Firmenname an' how is shown in the 'title' tag.
This title tag has the class .validation-advice.
I did not now how I must combine in the existing code. I tried it so:
<div style='display:none;color:#ed6e00;' class='validation-advice' id='advice-required-text_3'>Dies ist ein Pflichtfeld!</div>
but this is wrong.
You give me a better solution, and I put your code in the field 'Server Side Validation Code', I thought that is the correct position!?
Mac
Hi Mac,
I don't think that any of this code is using Server-side validation. There seem to be both styling and layout problems here. Please post all the code from the Form HTML box so I can take a look.
Bob
I don't think that any of this code is using Server-side validation. There seem to be both styling and layout problems here. Please post all the code from the Form HTML box so I can take a look.
Bob
Hi Bob,
Sorry but I'm not following here, is this code below is used to show different error messages when the required error event triggers or the valid email error triggers ?
Thanks!
Max
Sorry but I'm not following here, is this code below is used to show different error messages when the required error event triggers or the valid email error triggers ?
<div style='display:none;color:#ed6e00;' id='advice-required-text_3'>Dies ist ein Pflichtfeld</div>
<div style='display:none;color:#ed6e00;' id='advice-validate-email-text_3>Bitte geben Sie Ihre vollstÀndige E-Mail Adresse ein.</div>
Thanks!
Max
Hi Max,
This is a little feature of the MooValidation that lets you create custom warning messages that can be put anywhere on the page.
The first one id='advice-required-text_3' will display if the input with id='text_3' fails the 'required' test.
The second one id='advice-validate-email-text_3' will display if the input with id='text_3' fails the 'validate-email' test.
You can do this with any input and any validation - the structure is id='advice-{validation_type}-{input_id}'
Bob
This is a little feature of the MooValidation that lets you create custom warning messages that can be put anywhere on the page.
The first one id='advice-required-text_3' will display if the input with id='text_3' fails the 'required' test.
The second one id='advice-validate-email-text_3' will display if the input with id='text_3' fails the 'validate-email' test.
You can do this with any input and any validation - the structure is id='advice-{validation_type}-{input_id}'
Bob
Hi Bob,
Thank you! got it!đ
Best regards,
Max
Thank you! got it!đ
Best regards,
Max
Hi,
...just now, as I want to post the whole code - I found one '</div>' too much - and that was my mistake đ¶
Thank you all for your help!!
Regards
Mac
...just now, as I want to post the whole code - I found one '</div>' too much - and that was my mistake đ¶
Thank you all for your help!!
Regards
Mac
This topic is locked and no more replies can be posted.