close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

I would like to compare / validate if the gift card number is valid

Thread began 1/20/2020 12:32 pm by Jonas | Last modified 3/02/2020 1:55 pm by Ray Borduin | 286 views | 54 replies |

Jonas

I would like to compare / validate if the gift card number is valid

I would like to compare / validate if the gift card number is valid when the customer makes a booking.
I have two tables. The Giftcard table contains, among other things, the column ID that I want to compare with the booking number field that you enter in the form. I can't find any guide on this. Do you have any tips on how to do this?

Sign in to reply to this post

Ray BorduinWebAssist

Add a recordset to the page and filter it with the entered gift card number and see if there is a result or not. Then you can show an error for invalid card number if the recordset doesn't show a result.

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

Jonas

I'm not sure if I understand correctly. I created a recordset that I filtered (right Join !?) that shows cardnumberID from both columns:
Here is the recordset:

SELECT Giftcard.GiftcardID, Booking.BookingGiftcardnoID
FROM Giftcard RIGHT OUTER JOIN Booking ON Giftcard.GiftcardID = Booking.BookingGiftcardnoID
Then, how do I compare / validate when the form field is filled in?

Sign in to reply to this post

Ray BorduinWebAssist

Add a WHERE clause to the recordset to filter based on the entered value from the form. Then you can use server validation to validate the ->TotalRows value from the recordset to ensure it is a valid entry.

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

Jonas

I don't really understand how this Server Validation works.
I have created an pages from DataAssist where, there among other things, the gift card numbers exist.
First question: I can no longer change regular expression through any behavior. Is this correct? DataAssist builds this at the same time. But I must be able to change this afterwards, right?
Second: Can I change the look of JQuery Validation afterwards? Or remove it completely, to use Bootstrap's validation instead?
This is a side track to the post, but I would like to know the answers.
The main question is how to do what you describe. I have searched the Internet and searched your website forums and tutorials, but I am not wise in how to do this. A little frustrated!

Sign in to reply to this post

Ray BorduinWebAssist

First question: I can no longer change regular expression through any behavior. Is this correct? DataAssist builds this at the same time. But I must be able to change this afterwards, right?

Yes. You can edit the Server Validation server behavior to add Regular Expression validation after running the wizard. Regular Expression validation isn't exposed in the wizard itself.

Second: Can I change the look of JQuery Validation afterwards? Or remove it completely, to use Bootstrap's validation instead?

Yes and yes. You can change the look by updating the CSS file that is created or changing the javascript settings depending on what exactly you are trying to change. You can also remove it entirely by deleting the associated script tags at the bottom of the page.

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

Jonas

Question 1: I can't find where to change this from wizard? I know I can change the pattern, but then I need to know how to format this :)
Question 2: I mean I want to change the Error format, like what you can choose from Form Settings in DataAssist. Can I do this after from any wizard?

Sign in to reply to this post

Ray BorduinWebAssist

You can't change it from the wizard. You would have to update the Server Validations server behavior after application.

Yes, you can change the error format in the code directly or by going to Webassist->Forms->Validation->JQ Validation

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

Jonas

Good to know. Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

I don't know what I'm looking for in your attached file. What is it you are trying to do exactly? Where are you getting stuck? If you give specific details and ask a specific question then I can try to answer it.

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...