Gridbox Content Filters Improvements. Filter Items on The Fly!

Continue Reading
Mon. - Fri. 9 am - 5 pm Support Policy
Remember me

Google Sheets and Date/Calendar

3 months 2 weeks ago #1

  • Jacobo's Avatar
  • Jacobo
  • Posts: 2
Hello,

I am using Google Sheets integration, I have seen another post message regarding that only fields can be submitted to google sheets; so no date of submission can be added.

I need to record at Google Sheet the date form was submitted, I have been thinking about a work around, just adding a calendar field to my form.

But, is it possible to add to this calendar field automatically a default value equal to today date... then I could use a class to hidden this field, so final user will not see that field and I can use that information to record submission date at my google sheet.

Please let me know if there is any method to set a default value in a field.

Thank you,

Jacobo

3 months 2 weeks ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 7120
Hello,

For auto date picker you need:
Go to components/com_baforms/views/form/tmpl/date.php

Find
<input type="text" name="<?php echo $element->id; ?>" style="height: <?php echo $formSettings[3]; ?>;

Replace to
<input type="text" name="<?php echo $element->id; ?>" value="<?php echo date("d F Y"); ?>" style="height: <?php echo $formSettings[3]; ?>;

in order to hide you need to add a class "custom-class" for the calendar tool and hide it using CSS code:
.custom-class {
	display: none !important;
}


Regards,
Vyacheslav, Balbooa.com

3 months 2 weeks ago #3

  • Jacobo's Avatar
  • Jacobo
  • Posts: 2
Perfect! It works great!

3 months 2 weeks ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 7120
You are welcome ;)
Powered by Kunena Forum