Thanks for the great work you do with ChronoForms.
I am trying to figure out how to remove the space in front of the phrase "Please enter a valid email address." when someone types an incorrectly formatted email address.
I have modified the CSS and JSvalidation2.php files slightly, but this problem existed before I messed with those files.
You can see what I mean here...
http://www.indianabiofuels.com/SpaceInForm.jpg
I cannot figure out where the space is coming from.
I am trying to figure out how to remove the space in front of the phrase "Please enter a valid email address." when someone types an incorrectly formatted email address.
I have modified the CSS and JSvalidation2.php files slightly, but this problem existed before I messed with those files.
You can see what I mean here...
http://www.indianabiofuels.com/SpaceInForm.jpg
I cannot figure out where the space is coming from.
Hi rstevens,
Which version of ChronoForms are you using - that doesn't look like one of the latest releases?
Let me know and I can dig in the right code files.
Bob
Which version of ChronoForms are you using - that doesn't look like one of the latest releases?
Let me know and I can dig in the right code files.
Bob
Hi restevens,
I think that what is happening here is that the message is 'designed' to go to the right of the box with an intervening space - like the required messages, but your table cell isn't wide enough for this so it is being forced under the box- together with it's spacer character.
Bob
I think that what is happening here is that the message is 'designed' to go to the right of the box with an intervening space - like the required messages, but your table cell isn't wide enough for this so it is being forced under the box- together with it's spacer character.
Bob
It appears that is the case, I but cannot figure out where or how to remove that intervening space.
Hi rstevens,
It's buried somewhere inside livevalidation_standalone.js I guess.
Bob
It's buried somewhere inside livevalidation_standalone.js I guess.
Bob
It appears that you are correct. I found the insertion of a space in this part of the code...
elementToInsert.className += ' ' + this.messageClass + ' ' + className;
in this section...
* @var elementToIsert {HTMLElementObject} - an element node to insert
*/
insertMessage: function(elementToInsert){
this.removeMessage();
if( (this.displayMessageWhenEmpty && (this.elementType == LiveValidation.CHECKBOX || this.element.value == ''))
|| this.element.value != '' ){
var className = this.validationFailed ? this.invalidClass : this.validClass;
elementToInsert.className += ' ' + this.messageClass + ' ' + className;
if(this.insertAfterWhatNode.nextSibling){
this.insertAfterWhatNode.parentNode.insertBefore(elementToInsert, this.insertAfterWhatNode.nextSibling);
}else{
this.insertAfterWhatNode.parentNode.appendChild(elementToInsert);
}
}
},
... when I remove the first space, nothing happens. When I remove the second space, the problem is solved, but how the CSS style for the phrase is broken.
Any suggestions?
elementToInsert.className += ' ' + this.messageClass + ' ' + className;
in this section...
* @var elementToIsert {HTMLElementObject} - an element node to insert
*/
insertMessage: function(elementToInsert){
this.removeMessage();
if( (this.displayMessageWhenEmpty && (this.elementType == LiveValidation.CHECKBOX || this.element.value == ''))
|| this.element.value != '' ){
var className = this.validationFailed ? this.invalidClass : this.validClass;
elementToInsert.className += ' ' + this.messageClass + ' ' + className;
if(this.insertAfterWhatNode.nextSibling){
this.insertAfterWhatNode.parentNode.insertBefore(elementToInsert, this.insertAfterWhatNode.nextSibling);
}else{
this.insertAfterWhatNode.parentNode.appendChild(elementToInsert);
}
}
},
... when I remove the first space, nothing happens. When I remove the second space, the problem is solved, but how the CSS style for the phrase is broken.
Any suggestions?
Hi rstevens,
OK - one step forward and one step sideways. If that breaks the CSS - adn it should as it sets a classname - but fixes the problem then the problem must be in the css. There's probably a padding-left somewhere that looks like a space (I guess if it's on a span it would only affect the first line??)
Bob
OK - one step forward and one step sideways. If that breaks the CSS - adn it should as it sets a classname - but fixes the problem then the problem must be in the css. There's probably a padding-left somewhere that looks like a space (I guess if it's on a span it would only affect the first line??)
Bob
Hi ratevens,
It's a left margin:
Bob
It's a left margin:
.LV_validation_message {
font-weight:normal;
margin:0 0 0 5px;
}
in consolidated_common.css Bob
This topic is locked and no more replies can be posted.