close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

JQuery Validation

Thread began 3/13/2018 1:23 pm by Daniel | Last modified 3/30/2018 8:07 am by Ray Borduin | 2110 views | 12 replies |

Daniel

JQuery Validation

Hi how are you?

I want to find out from you:
On the attachment is an example of what I want it to look like when the user fills out a form to go into the database. How do I programme it with your product so that it looks exactly like this example? And if the clients don't do it like this then there is like an auto correct or a message to tell them that they have to redo it?

I tried with JQuery Validation but not 100% sure how to do it?

Thank you for your help.

Sign in to reply to this post

Ray BorduinWebAssist

Regular Expression validation patterns are the most comprehensive way to enforce complex patterns. I'd work with one field at a time. There are regular expression libraries you can look up online to find an expression that will work for you, or I can help if you can tell me specifically what you do or don't want to accept.

Sign in to reply to this post
Did this help? Tips are appreciated...

Daniel

Sorry for replying only now.

Where the client enters the price:
The text box should work in millions eg: 1 000 000.00
So if they enter only 900 000.00 it should display it 900 000.00 because it works in millions.

Then in the database it should just be normal like: 1000000.00.

Then how do I display that data in the database as 1 000 000.00 on the website again?

Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

You can use the number_format() function in php.

string number_format ( float $number , int $decimals = 0 , string $dec_point = "." , string $thousands_sep = "," )

so it would be something like:
<?php echo($RSColumnCode, 2, ".", " "); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...

Daniel

Thank you.

Sign in to reply to this post

Daniel

1. I have now done a course in Reg Expressions but still do not know how to do:
In the html text box in the form where the price will be entered I want it to enforce the pattern 1 000.00, 10 000.00, 100 000.00, 1 000 000.00. But
in the text box when the amount is entered I don't want it to show eg. 1000000.00 it must make the spaces 1 000 000.00.

2. I'm going to integrate Express Checkout: I have about eleven digital products on one page. Is it possible with eCart and Paypal Express Checkout
to customize the page with the eleven products on so that it adds 1 or more products and then does the checkout. The way I want the page to
operate is: The customer chooses the product/s and then pays and after they paid it takes them to the backend or their user account where they
can view their product(DIGITAL PRODUCT).

Thank you for your help.

Sign in to reply to this post

Ray BorduinWebAssist

I think this regular expression would work:

/^\d{1,3}( \d{3})*$/



Usually you would do something like that by requiring them to register and log in first. Then you can save the userID with the order so that after the purchase you can return a list of purchased products for download.

Sign in to reply to this post
Did this help? Tips are appreciated...

Daniel

Thank you

Sign in to reply to this post

Daniel

Hi

Sign in to reply to this post

Ray BorduinWebAssist

You would move the delete code to the top of the page above the repeat region.

Then use a hidden form element to save the image name and refer to that in the delete code, like:

php:
<?php

$WA_DeleteFileResult1 
false;
if((((isset(
$_POST["delete_farm_image"]))?$_POST["delete_farm_image"]:"") != "")){
$WA_DeleteFileResult1 WA_FileAssist_DeleteFile("images_farm/""".$_POST['imageName'] ."");
}
?>
<?php 
do { ?>
<div class="col-sm-2">
<form  action="" method="post" name="delete_farm_image">
<div style="background-color:#F00;">
<input type="hidden" name="imageName" value="<?php echo $row_pictures['farm_image']; ?>" />
<img  src="images_farm/<?php echo $row_pictures['farm_image']; ?>" style="width:128.66px;height:128.66px;"> </div>
<div>
<input class="btn btn-danger btn-sm" style="width:100%;border-radius:0px;" name="delete_farm_image" type="submit" value="DELETE">
</div>
</form>
</div>
<?php } while ($row_pictures mysql_fetch_assoc($pictures)); ?>
Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...