TOPIC:

Responsive Calendar shows up near the end of the form 6 months 2 weeks ago #239404

  • Topic Author
  • martenj52
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 1
Hello,

I have a form, about 1500px long (uses autoheight iframe) and Responsive Calendar is used in two different fields, one near the beginning and the other near the end.
The problem is that when it shows up, it always appears near the end of the form page, and not near its relevant field.
Is there a workaround this?

Also, I used the validation script I found in the Documentation, for validating the 2nd calendar field so that the date selected is not in the past. It works ok, but the format must be MM-DD-YYYY. I need DD-MM-YYYY, is that possible?

Please Log in or Create an account to join the conversation.

Responsive Calendar shows up near the end of the form 6 months 2 weeks ago #239408

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

I am not sure why you are facing this issues.

Would it be an option for you to use the regular Calendar element instead of the Responsive Calendar?

As for the validation, you can provide me the code that you are using which works for MM-DD-YYYY date format validation and I can adjust it to work for DD-MM-YYYY.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

Responsive Calendar shows up near the end of the form 6 months 2 weeks ago #239431

  • Topic Author
  • martenj52
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 1
It's the code I found here in the Documentation of the site,
function ff_currentdate_validation(element, message)
{
     if(element.value.split("-").length != 3){return message == '' ? element.name+" faild in my test.n" : message}
 
     var vDate = new Date(Number( element.value.split("-")[2]),Number(element.value.split("-")[0]-1),Number(element.value.split("-")[1]),0,0,0).getTime();
 
 
     var today = new Date();
 
     today.setHours(0);
     today.setMinutes(0);
     today.setSeconds(0);
     today.setMilliseconds(0);
     today = today.getTime();
 
     if(vDate < today)
     {
          if (message=='') message = element.name+" faild in my test.n";
          return message;
     }
     return '';
}

(In the first line, the "currentdate" is that calendar element's name in our form)

I tried the option of the normal calendar, but then the validation didn't work at all, for all elements in the form. So I switched back to the responsive calendar.

I include a screenshot, in 100% size, of the front end rendering, to see the problem. User has to scroll down the page, at the end of the form, to see the responsive calendar:
Attachments:

Please Log in or Create an account to join the conversation.

Responsive Calendar shows up near the end of the form 6 months 1 week ago #239486

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

Please try to use this script to validate a
function ff_currentdate_validation(element, message)
{
     if(element.value.split("-").length != 3){return message == '' ? element.name+" faild in my test.n" : message}
    
     var vDate = new Date(Number( element.value.split("-")[2]),Number(element.value.split("-")[1]-1),Number(element.value.split("-")[0]),0,0,0).getTime();
 
     var today = new Date();
 
     today.setHours(0);
     today.setMinutes(0);
     today.setSeconds(0);
     today.setMilliseconds(0);
     today = today.getTime();
 
     if(vDate < today)
     {
          if (message=='') message = element.name+" faild in my test.n";
          return message;
     }
     return '';
}

That is strange behavior that the calendar appears on the bottom of the form.

Let's see whether this script will work as you wanted and we can move on then.

Regards,

Mihaela
The following user(s) said Thank You: martenj52

Please Log in or Create an account to join the conversation.

Responsive Calendar shows up near the end of the form 6 months 1 week ago #239503

  • Topic Author
  • martenj52
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 1
The validation script works just fine, thanks a lot.

I tried some other themes, but I get the same issue with the responsive calendar. I don't know if it has to do with setting a form height in px (Form Settings: Height, just above the Autoheight option, which is also turned on) - it may be irrelevant, just a thought.

Will continue on this next.

Please Log in or Create an account to join the conversation.

Responsive Calendar shows up near the end of the form 6 months 1 week ago #239531

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello again,

Can you please try to preview your form in the backend of your site to see whether the calendar will be properly aligned.

Let me know the result.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.050 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!