We want to force registration form fields input to be all in uppercase and I tried this code <?php @$_REQUEST['firstname'] = strtoupper(@$_REQUEST['firstname']); ?>
but it doesn't help. Am I missing our something?
<div class="field name-firstname">
<?php @$_REQUEST['firstname'] = strtoupper(@$_REQUEST['firstname']); ?>
<label for="<?php echo $this->getFieldId('firstname')?>" class="required"><em>*</em><?php echo $this->getStoreLabel('firstname') ?></label>
<div class="input-box">
<input type="text" id="<?php echo $this->getFieldId('firstname')?>" name="<?php echo $this->getFieldName('firstname')?>" value="<?php echo $this->escapeHtml($this->getObject()->getFirstname()) ?>" title="<?php echo $this->getStoreLabel('firstname') ?>" maxlength="255" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('firstname') ?>" <?php echo $this->getFieldParams() ?> />
</div>
</div>
You're doing strtoupper on the form field value, not the actual value being sent to your action script, which handles the form processing. Try adding the strtoupper on your action script, or if you want to ensure the value is upper cased from anywhere, add a sql UPPER string function to the field via your query construct.