Monica
Junior Member
Posts: 11
|
Post by Monica on Mar 16, 2015 22:46:34 GMT
Hi. Sorry if this is very basic, but I am relatively new at building sites! I am building a contact form and I need 2 things: 1- A custom message in spanish that asks to fill in the required fields (I don't know how where to edit the text) and, 2- The option list to expand. By default it keeps the height I assign it all the time, but I want it to have a height of 15 and when the user clicks on it, expand to 80, and after an option is selected, return to 15.. as a lot of options lists do.
I have another question: what is the difference between text content and placeholder in the edit field options?
Thanks a lot!
Monica
|
|
|
Post by Graham on Mar 17, 2015 11:03:23 GMT
Hi Monica,
yes you can have all this
1. Once you add your field to your page look under its main tab and make sure you select required to be true ( we can add the message on the submit button)
2. First make sure you name all your fields - important - on your edit fileds click the main tab again and in the events area add this code in the click tab and make sure you substitute [#name] for the correct name of the field you in
[#name].style.height='80px';
- on the same field go over to the mouse out tab and add this code and make sure the [#name} is for the correct field [#name].style.height='15px';
- do this for all remaining fields
now for the custom message to fill out required fields.
- add your submit button to your form then select its advanced tab click in the events section and then in the click tab add this code (change it to spanish as well and the \n\n is 2 carriage returns by the way
alert('Please make sure you fill in \n\nall required fields.');"
3. for any hint text on your form fields it goes in the placeholder area
hope this helps
Graham
|
|
Monica
Junior Member
Posts: 11
|
Post by Monica on Mar 19, 2015 4:12:53 GMT
Thanks Graham, it was very helpful! If you don't mind I have 2 more questions: 1- The field type I did all this height thing is for an option list, and when I test it and select the option I want, I want the selected option to be the one to remain visible. Instead it goes back to the tiny size and show the first visible option, not the one selected. How can I do that? You can view my site here: www.soportephilips.com/garantiaforma.htm2- I didn't understand very well the instructions for the custom message. Specially the "\n\n is 2 carriage returns" part Thanks again!
|
|
|
Post by J on Mar 23, 2015 15:57:38 GMT
Just a quick thought which might be worth a try: The Option list has a property named 'multiple'. If you untick that property completely you might get the behaviour you want without using any event code.
Cheers, J
|
|
|
Post by Frank on Mar 23, 2015 20:11:21 GMT
Hi Monica,
Yes it should do it by default. In the OPTIONS LIST add all your options (example) Escoja su municipio:,mexico1,mexico2,mexico3...mexico10 then right under it there is something called MULTI-SELECT uncheck (not FALSE) Now the option will show ONE LINE "Escoja su municipio:" when you click the arrow it opens down to show all your options... mexico1-mexico10 If you pick mexico6 it closes showing mexico6 Hope this helps, Frank
Regarding placeholder and text content.. Placeholder: If you add a placeholder example: address here when the click the area it disappears and they can start typing in the same area that the placeholder text was.
Text content: places text in the area...but when clicked it adds the curser at the end of the text.
Personally I like Placeholder or nothing.
name*: Please enter first and last name then when they click the input area the words disappear and they can start typing. Try it.
|
|
Monica
Junior Member
Posts: 11
|
Post by Monica on Mar 24, 2015 17:16:12 GMT
Thanks Graham, J and Frank!! It worked perfectly! You all saved my contact form
|
|