Welcome, Guest
  • Page:
  • 1
  • 2

TOPIC: Date picker in form?

Date picker in form? 5 years 3 months ago #4981

Hi guys

I am creating a form where I need the users to be able to pick a date in the form. Is this a functionality in the Breeze? Or do I have to make 3 dropdownmenus (DD/MM/YY)?

Brgds. Jacob Skov
  • itsupporten
  • itsupporten's Avatar
The administrator has disabled public write access.

Re:Date picker in form? 5 years 3 months ago #4982

Hmmm... found the answer myself in the community forms: Calendar. But I only need one field? When I try to drop the end date fiield I get an error popup stating the selected date. I tried to remove all entries to the end date in the submitpieces in the form, but I still get the error? What do I do?

Submit form looks like this:

// Get the date entered

$startdate = '';

foreach ($this->submitdata as $data)
switch ($data[1]) {
case 'StartDate' : $startdate = date("Y-m-d",strtotime($data[4]));
break;

default : break;
} // switch
// Pop-up the entered value to show it has been read
echo ('
<script language="JavaScript">alert ("'.$startdate.'");</script>


')

And it used to look like this:

// Get the date entered

$startdate = '';
$enddate = '';
foreach ($this->submitdata as $data)
switch ($data[1]) {
case 'StartDate' : $startdate = date("Y-m-d",strtotime($data[4]));
break;
case 'EndDate' : $enddate = date("Y-m-d",strtotime($data[4]));
break;
default : break;
} // switch
// Pop-up the entered value to show it has been read
echo ('
<script language="JavaScript">alert ("'.$startdate.' to '.$enddate.'");</script>

')
  • itsupporten
  • itsupporten's Avatar
The administrator has disabled public write access.

Re:Date picker in form? 5 years 3 months ago #5103

Look in here:
http://www.facileforms.biz/wiki/Using_JSCalendar_in_FF
Download the attached file.
Works fine.

File Attachment:

File Name: JSCalendar.zip
File Size: 2414
The administrator has disabled public write access.

Re:Date picker in form? 4 years 10 months ago #8382

You should update that link in the wiki, the original link there is broken...
  • seahorse
  • seahorse's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
The administrator has disabled public write access.

Nice Datepicker 4 years 10 months ago #8383

Hi guys, I spent most of the day to give some datepickers a try.
I just wanted to get rid of the old JSCal. First I tried JSCal2, but the guy seems to want some 80 $ to run it and anyway I didn't suceed on the fly and gave up on it.

I went out looking for something else and found this:

Unobtrusive Date-Picker Widget V4

To install, copy the contents of the .zip file to {mossite}/includes/js/

For the "before form" script:
// 
load the standard FacileForms library
$this->execPieceByName('ff_InitLib');

// include the javascript functions for dates
echo ('
  <script type="text/javascript" src="{mossite}/includes/js/date-picker-v4/js/lang/de.js"></script>
  <script type="text/javascript" src="{mossite}/includes/js/date-picker-v4/js/lang/en.js"></script>
  <script language="javascript" src="{mossite}/includes/js/date-picker-v4/js/datepicker.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" media="all" href="{mossite}/includes/js/date-picker-v4/css/datepicker.css">
');

Its pretty easy to trigger. Just add a text field and provide the class for the input. Thats it, the script does the rest and it looks amazing.

The only drawback I found so far, is the maxlength of the class input field in FacileForms itself, its set to 30. To call a calender with a lot of options, the classname could be very long and only the first 30 characters are saved. So I went about changing it here:

/administrator/components/com_facileforms/admin/element.html.php

search for this line:
<input type="text" size="30" maxlength="30" name="class2" value="<?php echo $row->class2; ?>" class="inputbox"/>

and change to:
<input type="text" size="30" maxlength="120" name="class2" value="<?php echo $row->class2; ?>" class="inputbox"/>

thats probably enough space.

Then you have to alter the corresponding field in the database, its also set to hold 30 chars. Its in the table "jos_facileforms_elements" the field name is "class2". Just set it to the same value you apllied to the maxlenghth.

Thats it, see it here:

East End Apartment

Maybe somebody could figure out howto pick the right localisation onload, from within FacileForms.

Cheers
Klaus
  • seahorse
  • seahorse's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
The administrator has disabled public write access.

Re: Nice Datepicker 4 years 10 months ago #8384

Seems like I was too happy too fast. The date shows up in the text field, but is not submitted with the form.

Anybody could figure why ?
  • seahorse
  • seahorse's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ForumSupport, lennerd, pedro81
Time to create page: 0.107 seconds
Powered by Kunena Forum :: Joomlana_Dark-by- bz_kunena-templates

Our Discounts

Lifetime Subscription

Get lifetime access to all of our products and 2 years of professional support -- for just $149 USD. No limits on domains!. Includes all of our current and future Joomla!® extensions, WordPress® plugin, Joomla!® templates and WordPress® themes -- all of our products!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our 1-Year or Lifetime Subscription plans.

How to receive the discount:

  • Send us a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with a proof of purchase (for example a paypal receipt).
  • Await payment instructions and enjoy your membership!

Our Latest Joomla!® Templates

 
 
 

Are You Lazy? Get Pre-Made Forms!

Get pre-made forms, ready-to-run to kickstart your form projects. Our form apps section contains complete forms, such as user registrations that you can import right into your BreezingForms installation and adjust as required. read more

About

Crosstec GmbH & Co. KG

Hohenzollernring 57

50672 Cologne, Germany

Imprint


Live Chat Software