How to Allow your Members to Enter their Birthday and Save their Age

This post will teach you how to add birthday input fields in your Webflow site and calculate member ages automatically. You'll learn why collecting birthday data matters and how to implement this feature using our ready-to-use cloneable.

TABLE DES MATIÈRES
Ovidiu

How to allow your members to enter their birthday and save their age

Les registres des membres sont nécessaires

https://www.memberstack.com/scripts/birthday-age-input

Tutoriel

Clonable

Pourquoi/Cas d'utilisation

- Display members’ age based on the birthdate they input.

Allowing members to enter their birthday and save their age on a Webflow site

This guide will help you add a birthdate input on your page and automatically display the age based on that input.

To allow members to add their birthday and save their age on your Webflow site, we’re going to use MemberScript #119 – Age Calculator from Date Input. Follow the link to get the code you’ll need to add to your page and watch a video tutorial on how to set everything up.

Setting it up

Begin by creating the date input and styling it however you like. Once that’s done, add this attribute to it:

· ms-code-bday-input=”1”

Now if you want to display the age on the page, you need an additional input with the following attribute:

· ms-code-age-input=”1”

The reason both of these attributes have the same value is because that’s how we’re matching both inputs to each other.

So, if for some reason you have multiple birthday inputs on your page and want to display the age for each, simply change the values accordingly. They can be either numbers or words.

Making it work

Now that you’ve got everything set up in Webflow, all you need to do is add the MemberScript #119 custom code to your page, before the closing body tag.

Conclusion

That’s everything, you can now go ahead and test the progress bar on your live site.

Si vous souhaitez utiliser notre projet de démonstration pour commencer, cliquez simplement sur le bouton ci-dessous pour l'ajouter à votre site Webflow.

Our demo can help you add a birthdate input and on your Webflow site and automatically display the person’s age.

Take me to Cloneable!

Ajoutez des adhésions à votre projet Webflow en quelques minutes.

En savoir plus

Plus de 200 composants Webflow clonables gratuits. Aucune inscription n'est nécessaire.

Voir la bibliothèque

Ajoutez des adhésions à votre projet React en quelques minutes.

Commencer
Qu'est-ce que Memberstack ?

Auth & paiements pour les sites Webflow

Ajoutez des logins, des abonnements, du contenu à accès limité, et plus encore à votre site Webflow - facile et entièrement personnalisable.

En savoir plus
Commencer à construire

Essayez Memberstack et découvrez ce que vous pouvez construire !

Memberstack est 100% gratuit jusqu'à ce que vous soyez prêt à vous lancer - alors, qu'attendez-vous ? Créez votre première application et commencez à construire dès aujourd'hui.