THEMA:

Bestellformular für Black Friday nur von 0:00Uhr bis 23:59Uhr aktivieren 5 Jahre 4 Monate her #215583

  • KAPAs Avatar Autor
  • KAPA
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Registered
  • Beiträge: 148
  • Dank erhalten: 0
Hallo,
ist es möglich, ein Formular zeitlich begrenzt zu aktivieren?

Für Black Friday benötige ich ein Formular, welches genau nur zu diesem Zeitraum aktiv ist. Davor und danach dürfen keine Eingaben mehr möglich sein bzw. es darf nichts zu senden sein.
Es grüßt aus dem deutschen Ruhrpott
/Greetings from the German Ruhr area

Klaus

Sofern nicht anders angegeben:
Joomla aktuellste Version, Breezingforms PRO aktuellste Version, Breezingcommerce aktuellste Version, Template aktuellste Version! Lifetime-Lizenz.
Unless otherwise stated:
Joomla latest version, Breezingforms PRO latest version, Breezingcommerce latest version, Template latest version! lifetime license.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Bestellformular für Black Friday nur von 0:00Uhr bis 23:59Uhr aktivieren 5 Jahre 4 Monate her #215632

  • marko.bosnjak
  • Offline
  • Benutzer ist gesperrt
  • Benutzer ist gesperrt
  • Registered
  • Beiträge: 2222
  • Dank erhalten: 280
Hello,

we are currently little short on German speaking supporters, so I hope you don't mind me answering in English.
I made an example. Find the form attached.

1) In Section "TIMER"> Description: Edit > SourceCode you will find the placeholder DIV for your timer:
<div style="display: flex; justify-content: center;">
<h3>Time left = <span id="timer"></span></h3>
</div>

2) Then in form's properties > Advanced tab > More options > Form pieces > Before Form > Type > Custom you'll find this code:
echo '
<script>
// Set the date we are counting down to
var countDownDate = new Date("Nov 10, 2017 11:01:25").getTime();

// Update the count down every 1 second
var x = setInterval(function() {

    // Get todays date and time
    var now = new Date().getTime();
    
    // Find the distance between now an the count down date
    var distance = countDownDate - now;
    
    // Time calculations for days, hours, minutes and seconds
    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
    
    // Output the result in an element with id="demo"
    document.getElementById("timer").innerHTML = hours + "h "
    + minutes + "m " + seconds + "s ";
    
    // If the count down is over, write some text 
    if (distance < 0) {
        clearInterval(x);
        document.getElementById("timer").innerHTML = "EXPIRED";
        location.href = "https://www.google.com";
    }
}, 1000);
</script>
';
IMPORTANT:
In this line you'll specify the date:
var countDownDate = new Date("Nov 10, 2017 11:01:25").getTime();
If I'm not mistaking, the date for Black Friday should be:
var countDownDate = new Date("Nov 24, 2017 23:59:00").getTime();
When the countdown is over, users will be automatically redirected to a certain page, in my case it's Google:
location.href = "https://www.google.com";
Ideally would be if you could start the countdown on Friday at 00:00 so the script would only count hours, minutes and seconds without additional calculation of days, etc.. Of course, if that's OK with you.

Test it out and let me know if it works for you.

Regards,
Marko
======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: Post by marko.bosnjak.
  • Seite:
  • 1
Moderatoren: ForumSupport
Ladezeit der Seite: 0.052 Sekunden

Angebot

Sommer Special! Alle Mitgliedschaften zum Sonderpreis!

Prio Support, alle Extensions und alle Templates in einem Paket.

Hier geht's zur Bestellung

Crosstec hilft sparen!

Falls Sie neu bei Crosstec sind aber bereits einen Formulargenerator bei einem anderen Hersteller gekauft haben, dann bekommen sie von uns einen Rabatt von 25% auf unsere 1-Jahres und Pro-Mitgliedschaften

Wie Sie an den Rabatt kommen?

Schreiben Sie uns einfach eine kurze Email mit beigelegten Kaufbeleg (z.B. PayPal Quittung) an sales@crosstec.org.

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!

Wir unterstützen die Joomla Community

Crosstec unterstützt weltweit alle offiziellen Joomla! User Groups und Organisatoren von Joomla! Days die bei Joomla.org registriert sind.

Falls das auf dich zutrifft und du eines unserer Produkte brauchst, schreib uns eine kurze Email an info@crosstec.org und du bekommst eine Flatrate-Mitgliedschaft geschenkt!