convert form persist value to upercase
I have a multi step form ( 3 steps ) which uses form persist to hold the input values and bind them to the insert behaviours on step 3.
Step 2 has the following input field with a text-transform style so it views in uppercase no-matter what is entered.
<input type="text" class="form-control col-md-3" id="birth_1" name="birth_1" style="text-transform: uppercase" aria-describedby="birth_1_label"
placeholder="First three letters ONLY of place of birth" value="<?php echo(WA_getSavedFormValue("consentB","birth_1")) ?>">
I have then tried to use 'strtoupper' on the insert behaviour on step 3 as follows:
<?php
if (isset($_POST["submit-consent-s"]) && $rsConsLeaseholders->getColumnVal("total_flats") <= 10) {
$InsertQuery = new WA_MySQLi_Query($RTMFi);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "reg_owners_security";
$InsertQuery->bindColumn("owner_id", "i", "".$_SESSION['ownerID'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("birth_1", "s", "".strtoupper((WA_getSavedFormValue("consentB","birth_1"))) ."", "WA_DEFAULT");
……….
………..
$InsertQuery->saveInSession("securityID");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
But this does not convert the database entry to uppercase.
Any ideas Ray?
I've attached the two pages if it helps!
Thanks in advance!