PDA

View Full Version : response mail layout


Marc
07-01-2009, 03:18 AM
hi

2 questions,

1. in the response mail i get from the form i don't want to show the security code (unnecesary) how to get rid of it?


2. in my form all works fine. if i fill out right, everything is turning green, exept my list/menu where i select mr or mrs? can i let this turn green aswell when the user selected
anything?

txs a lot


marc

Ray Borduin
07-01-2009, 07:40 AM
1) I think this is supposed to be excluded by name... anything that begins with Security_ should be removed automatically.

2)Apply spry validation to the field using DW Insert->Spry->list validation

Marc
07-01-2009, 09:59 AM
txs ray,

you where right. in point 1 i changed the Security_ to Sicherheits_. so i changed again and it works great now.

in point 2: itried but it don't work.
i will check again this night

txs ray

Marc
07-04-2009, 02:39 AM
ray,

i'm becoming very frustrated here :(
i tried it with DW Insert->Spry->list validation but it won't work at all.
don't you think it is possible to change the contact.php for the next Contact Form Solution Pack 1.03 in that manner that it contains one of each formular elements? (1 textfield, 1 password field, 1 textarea, 1 checkbox, 1 radio button, and 1 dropdown menu)
would be easyer to work with.

txs

Ray Borduin
07-06-2009, 07:46 AM
I appreciate the suggestion... not sure how much easier it would be though... cutting and pasting and editing to make names unique should be more difficult than just adding the list validation with spry.

Here is what you shoudl have done.
1) highlight your list
2) go to insert->spry->list validation

What do you mean it doesnt' work? What doesn't work about it? What happens?

Marc
07-06-2009, 10:58 AM
ok ray,

i try to tell what i've done.
i take the original contactus.php and added above "your name" a list. then i highlighted the list and did insert->spry->list validation. like you told me.
so now when i open the contactus.php in my browser the list is there with 3 entries. "select - mr - mrs". when i click the list it turns yellow. i want that the first entry does not count as a selection. so only mr and mrs. but when i select nothing at all it do not turn red or green at all like the textfields.
this is my great problem. and sorry for my bad english

txs

Ray Borduin
07-06-2009, 11:02 AM
make sure your top option has a blank value like:

<option value="">select</option>

and it should work. Post the url if you continue to have problems.

Marc
07-06-2009, 11:10 AM
by the way, ray

"I appreciate the suggestion... not sure how much easier it would be though"
it would be easy to copy paste the servervalidations and validations showif as they are not set by inserting the new form element. so it would be very nice too see this change coming. as you can assume i am not the greatest php guru, that is why i spend money for the solution pack. but it seems not so easy like i thought it would be. but i know you're the big specialist and you'll help me out of trouble :)

txs

Marc
07-06-2009, 11:11 AM
this is what i did for the select

<select name="Anrede" id="Anrede">
<option value="" selected="selected">Auswahl</option>
<option value="Herr" <?php if (!(strcmp("Herr", (ValidatedField("contact","Anrede"))))) {echo "selected=\"selected\"";} ?>>Herr</option>
<option value="Frau" <?php if (!(strcmp("Frau", (ValidatedField("contact","Anrede"))))) {echo "selected=\"selected\"";} ?>>Frau</option>
</select>

Ray Borduin
07-06-2009, 11:18 AM
Does the client spry validation work?

The reality is that 99% of the people using the page won't ever see the server validation unless they enter the wrong CAPTCHA or security answer or they have javasript turned off the spry validation catches most of it and php isn't really needed.

The server validation and showif code is exactly the same for a list as it is for a text field. But it has to be added to the server validation on top of the page as well with a unique identifier and that identifier has to be referenced in the showif. It is best to use the Validation Toolkit for this if you are not a php guru.

I'd start with getting spry to work... Then get the validation added to the server validation on top of the page... then try to get the message to show.

Take it one step at a time and it should be pretty easy to do... I'm not sold that having a sample field would help since validation still isn't quite as simple as cutting and pasting even in that case.

Marc
07-06-2009, 11:35 AM
ray,


please click on the submit button without filling out anything. as you see everywhere is the red text to provide anything.
i also had to add this code myself to the var spryselect1 myself
"none", {validateOn:["change"]}
i found this on other websites. thats why it would be easy to copy & paste. at least there would be one of each formular fields to look at the code.

Marc
07-06-2009, 12:58 PM
ray, as you can see i almost got it fixed. the only thing needed is the green and red colors.
below is the code i actually use for the menu but there is missing something to add the colors provided by the SpryValidationSelect.css

<label>
<select name="Selection" id="Selection">
<option value="">Select</option>
<option value="Mr" <?php if (!(strcmp("Mr", (ValidatedField("contact","Selection"))))) {echo "selected=\"selected\"";} ?>>Mr</option>
<option value="Mrs" <?php if (!(strcmp("Mrs", (ValidatedField("contact","Selection"))))) {echo "selected=\"selected\"";} ?>>Mrs</option>
</select></label></span>
<?php
if (ValidatedField('contact','contact')) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span id="selectionServerError" class="textfieldServerError">Please provide a Selection.</span>
<?php //WAFV_Conditional contact.php contact(1:)
}
}
}?>

Ray Borduin
07-06-2009, 01:31 PM
Which colors are you referring to? The background colors on the fields themselves?

They seem to work onBlur... do you mean after server validation? not sure why you aren't running your spry vaidation onSubmit as well...

I think you should remove:

onsubmit=""

from the form.

Marc
07-07-2009, 05:05 AM
ray,

after hours coding, recoding and re-recoding finaly i got it.
as you see on the page everything is working now.
i had to add {validateOn:["change"]} at the end of the "var spryselect1"

and this in the select field

onchange="if (document.getElementById('anredeServerError')) document.getElementById('anredeServerError').style .display='none'" value="<?php echo(ValidatedField("contact","Anrede")) ?>"
so with a couple of new grey hair in my beard i beat the challenge of the CFSP.

txs for spending your time