Difference between revisions of "Functions:orderExpDateOptions"
From Whirlwind eCommerce Wiki
Line 1: | Line 1: | ||
− | {{Page Template | + | {{Page Template Functions Shortcuts}} |
== Description == | == Description == | ||
Retrievs string of expiration date options to be used in a <SELECT> tag. Typically used in the payment checkout template. | Retrievs string of expiration date options to be used in a <SELECT> tag. Typically used in the payment checkout template. |
Latest revision as of 12:44, 23 October 2008
Description
Retrievs string of expiration date options to be used in a <SELECT> tag. Typically used in the payment checkout template.
Syntax
$string = eV::orderExpDateOptions($expDate=NULL);
Paramaters
- expDate DATE OPTIONAL
- The date to be selected. Must by in DATE string format (ex: 2008-10-08)
Return Values
String of option tags to be placed inside a <SELECT> tag.
Examples
// set a pre selected date for the exp date $expDate = "2008-10-08"; // get the option tags $expDateOptions = eV::orderExpDateOptions($expDate); // output the results in a form echo "<form action=\"index.php\" method=\"post\">"; echo "<select name=\"expDate\">" . $expDateOptions . "</select>"; echo "<input type=\"submit\" value=\"go!\"> echo "</form>";