PayEx / PayEx.Magento

Legacy PayEx Payment Gateway Extension for Magento 1
https://packagist.org/packages/payex/payments
Open Software License 3.0
4 stars 12 forks source link

enhancement onfocus for value #72

Closed urbancrew closed 6 years ago

urbancrew commented 6 years ago

add onfocus to SSN input for financing and part payment so that the text 'Social Security Number' disappears when you click on the input (as it is now you have to manually erase the letters in the field so that you are able to type your SSN). onfocus="if (this.value=='<?php echo Mage::helper('payex')->__('Social Security Number'); ?>') this.value='';"

fully like this: <input name="social-security-number" id="social-security-number-invoice" title="<?php echo Mage::helper('payex')->__('Social Security Number'); ?>" value="<?php echo Mage::helper('payex')->__('Social Security Number'); ?>" class="required-entry input-text" type="text" onfocus="if (this.value=='<?php echo Mage::helper('payex')->__('Social Security Number'); ?>') this.value='';" />

urbancrew commented 6 years ago

or perhaps with onblur so that when you click outside the field then the text 'Social Security Number' appears again:

<input name="social-security-number" id="social-security-number" title="<?php echo Mage::helper('payex')->__('Social Security Number'); ?>" value="<?php echo Mage::helper('payex')->__('Social Security Number'); ?>" class="required-entry input-text" type="text" onblur="if(this.value == '') { this.value='<?php echo Mage::helper('payex')->__('Social Security Number'); ?>'}" onfocus="if (this.value == '<?php echo Mage::helper('payex')->__('Social Security Number'); ?>') {this.value=''}" />

olegisk commented 6 years ago

Hi @urbancrew I'm not sure that good idea. Because already looking fine on default theme. You can override "checkout/onepage/billing_with_ssn.phtml" template if you want. checkout1 checkout2