close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert DatePicker Values

Thread began 1/29/2010 7:22 pm by jurinski334466 | Last modified 2/08/2010 11:26 pm by Dani Chankhour | 4002 views | 5 replies |

jurinski334466

Insert DatePicker Values

Could someone please explain to me how to insert the date into mysql using the DatePicker?

I built a form using FormBuilder which includes the DatePicker but, I'm unsure how to code the DatePicker to insert the date into the database. I tried using the php value from the form with no success.

<?php echo((isset($_POST["Date_Picker_Select_A_Date_field"]))?$_POST["Date_Picker_Select_A_Date_field"]:"") ?>

I don't know php all that well, and I'm not sure what steps I need to take next to insert the date correctly into mysql. Would someone please point me in the right direction?

Thank you.

Sign in to reply to this post

Dani Chankhour

First, make sure that your date column data type is set to date and then in your form we need to change the format of the date to look like this 'yyyy-mm-dd'.

In DW look for these lines of code:

changeMonth: true,
changeYear: true,

and change it to:

changeMonth: true,
changeYear: true,
dateFormat:'yy-mm-dd',


And then on the bottom of the page change the spry validation from:

format:'mm/dd/yyyy'

to

format:'yyyy-mm-dd'

Sign in to reply to this post

jurinski334466

Thank you very much, Dani.

I got the forms working thanks to your code suggestions--that saved me a lot of time spent in trial and error.

Two more Questions:
1) Is there any information or tutorials somewhere describing how to integrate/convert/update DataAssist forms with FormBuilder forms? I could definitely use some basic step-by-step instructions detailing how to accomplish this task.

2) Can the DatePicker be configured to work on search forms to search by date? If so, how?

Thanks again for your help.

Sign in to reply to this post

Office Guy-172461

Have a look here:

modifying_custom_form.pdf

Sign in to reply to this post

jurinski334466

Thanks for the link to the Modifying an Existing Form pdf. I had read the information before, but I guess not all of it had sunk in.

However, I must still be doing something wrong because after I attach the insert behavior to the new FB form, the php seldom works between the pages and requires a lot of fiddling to get the pages working again. Names between the DA and FB pages don't seem to match up, and I'm often unsure what needs to be changed where, to get pages working again.

Does anyone have any tips for building a form with FB where the php works right the first time with other DA forms or is it just me that has this problem?

Also, can the DatePicker be configured to work on search forms to search by date? If so, how?

When I use the DatePicker in a search form, the form returns all results and not results for a specific date. Using DatePicker, what settings should I use in the DASearch Server Behavior configuration to search by date or between dates?

Thanks for any help and advice.

Sign in to reply to this post

Dani Chankhour

Could you please give me an example of how the Form Builder form is not working with the DA insert server behavior. You should have to change any thing on the form or the Server Behavior to get the insert to work. If there is a problem that could see and i will be more than happy to help you.


In regard to the search, have you changed format to a UK format already?

If yes, that could be part of the issue.

Sign in to reply to this post

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