Validation on decimal number
Hi, when update the price (admin->product_update.php) using the decimal sepator (10,10) instead the dot (10.10) get the following error.Have you a suggestion for solve it???
Hi, when update the price (admin->product_update.php) using the decimal sepator (10,10) instead the dot (10.10) get the following error.Have you a suggestion for solve it???
You can change the number format in the spry property settings if you are using CS6 or below
Capture.JPG
In the CC version you may need to update the script manually:
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "currency", {format:"dot_comma"});
Thank you Ray for your reply, the code used is quite different from your code:
<label for="ProductPrice">Price: <font color="#FF0000">*</font></label>
<span id="sprytextfield4">
<input type="text" name="ProductPrice" id="ProductPrice" value="<?php echo(isset($_GET['valid'])?ValidatedField("ProductsUpdate","ProductPrice"):$row_WADAProducts['ProductPrice']) ?>" size="32" onBlur="if (document.getElementById('ProductPriceServerValidation')) document.getElementById('ProductPriceServerValidation').style.display='none';" />
<span class="textfieldRequiredMsg">Please enter the price of this product in your store.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
<?php
if (ValidatedField('ProductsUpdate','ProductsUpdate')) {
if ((strpos((",".ValidatedField('ProductsUpdate','ProductsUpdate').","), "," . "4" . ",") !== false || "4" == "")) {
if (!(false)) {
?>
<span class="textfieldServerError" id="ProductPriceServerValidation"> Please enter the price of this product in your store. </span>
Actually use:
OS WIN7 64
CS 5.5 Master Collection
Where I can change it ?
The script tag I referenced will be at the bottom of the page just before the </body> tag. You don't have to update anything in the html in the area you have referenced.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.