≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Combo Box
Posted by:
(you are not logged in)
Enter the missing letter in: "Internatio?al"
(you are not logged in)
Text:
[quote][b]emvie468[/b] wrote: I have a Combo Box on my webform. I am trying to code it so that the choice entered is retained, if correct, when the form returns other errors. Internet searches suggest I need to do this in the Value of the Combo Box from the Properties Pane in RocketCake. This I understand, however the code needs to be inserted between the <option> tags. The searches tell me the code is this (or other versions of this) : <?php echo $Month =='December'?'selected':' ';?> (where in my form, December is one of the choices for the Combo Box called 'Month', that can be chosen) putting this in the Value (Properties pane) results in this: <option value="<?php echo $Month =='December'?'selected':' ';?">December</option> however, the code actually needs to be after the "" of value= and before the >December</option>. in other words, I want it to look like this: <option value="December" <?php if ($Month == "December") { echo " selected"; }?>>December</option> How can I get code to be inserted between <option value="..." and >....</option>? Or is there another way to retain the drop-down choice selected when, if correct, stays there when form returns with other errors.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact