close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

I've created a search form using webassist and I'd like to restrict the first date that can be used

Thread began 5/13/2015 12:32 pm by Daniel | Last modified 5/18/2015 5:18 pm by Ray Borduin | 1055 views | 23 replies |

Daniel

I've created a search form using webassist and I'd like to restrict the first date that can be used

I have created a search page and currently the first date that can be selected can be anything. I would like to restrict this to a time period two years before today. How can I accomplish that?

Attached Files
index.php
Sign in to reply to this post

Ray BorduinWebAssist

You can use the webassist server validation for dates to restrict this.

Then you can use <?php echo(date('m/d/y',strtotime('-2 year'))); ?> as the minimum date requirement.

Sign in to reply to this post

Daniel

Field Validation and date restriction

When I selected the server validation and then inserted the code you gave me the page would not display. What am I doing wrong?

Dan

Sign in to reply to this post

Daniel

Additional Comment Field Validation & Date Restriction

Am I pulling the Server Validation from the right place? I tried setting the Server Validation before I generated the pages and it still allows me to set a date prior to two years before today

Sign in to reply to this post

Ray BorduinWebAssist

Post a copy of the page you are working on and I can try to debug it.

Sign in to reply to this post

Daniel

Here are the pages

I generated new pages because I've probably corrupted those from before. The search page won't display when I put the server validation in there.

Attached Files
allshows2_detail.php
allshows2_insert.php
allshows2_results.php
allshows2_search.php
allshows2_update.php
Sign in to reply to this post

Ray BorduinWebAssist

Well the first thing is that you have to add the validation to the results page and not the search page directly. Since the search page submits to the results page, it is the page that needs the server validation.

Remove the server validation from the search page. It is odd though... it appears to be applying without a trigger value. What did you put in as the trigger when applying the server behavior?

Sign in to reply to this post

Daniel

Trigger Value`

I didn't put a trigger value in originally, then I read a little more and I put in any form any post. That didn't make a difference however. I went to the results page and the trigger value there is (isset($_GET["Search"]) || isset($_GET["Search_x"])) && !isset($_GET["invalid"]) and it was already there. Is that the one we want to use or should it be something different?

Sign in to reply to this post

Ray BorduinWebAssist

That is the correct one... now add the date validation that I suggested.

Sign in to reply to this post

Daniel

Still didn't work

I went to the results page and clicked edit the validations that were already there. I added the "date/time" validation type, used the "showbegin" dynamic variable and then entered the code you gave me in the "minimum" date area. I clicked OK and then saved the form and uploaded everything to the server.

Unfortunately it still allows me to enter a date prior to 5/15/2013 which is what I wanted to prevent. When the results are displayed they include events prior to 5/13/2013. Actually I don't care what date the person searching wants to enter... I just don't want anything before two years ago displayed.

I'm all ears for suggestions!!!!

Sign in to reply to this post
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...