Thxs
Thxs
Can you please explain in more depth, what you are trying to do?
The more information you give, to explain what you want to accomplish, the easier it will be for people to help.
This is one of those issues that seems silly but is not easy.
The profile questions are defined by the administrator, and the date of birth is one of the questions already asked, but you can modify it and even delete it.
The form where it is used presents all the questions that are defined for that type of account, and these questions can be of several types. In this case it's a Date (BirthDate) type and we can't alter how it works because it would change any other OxWall date question or any plugin that uses this type of questions (like Events, for example)
It might be easier to create a new text question and a plugin or a kernel modification that copies the data entered here into the actual BirthDate field, but you still need to check that you have entered a valid number.
As it's a dynamic form I can't think of any simple modification of the HTML/CSS type to do this, and hiding day and month would give an error because they wouldn't be defined, you would have to put them to January 1st, December 31st or something like that that is fixed.
In short, you need 4 hours from a good programmer or 48 from one who has no experience with OxWall.
Is there a way to pre-populate the month and day, so all they would have to do is enter the year?
With the way hackers work and doxing is a big thing now, people are hesitant to give out their date of birth.
And Yes they can enter any information, but the mere fact that I am asking for that information makes a person wonder.
As long as you are not going to use the data for anything why cant you just uncheck required and signup and profile edit in the profile questions. This i believe will hide the input field.
Then create a new question for just the year of birth.
have not tested that but maybe patricia has.
I think Patricia is correct. Removing the day and month field from the system might cause a lot of problems.
I think the right way to do this would be to simply hide the day and month from your users, and prepopulate it with a default value, as you and Patricia suggested.
To remove the day and month fields, and only register with year of birth -
Enter the oxwall admin panel. Go to "Settings->Page Settings" ( yoursite.com/admin/settings/page ).
In the field named "Custom head code", enter the following:
<style>
/* Hide day and month of birth on join-form page */
#joinForm select[name^="day_"],
#joinForm select[name^="month_"],
/* Hide day and month of birth on profile edit page */
select[name="day_birthdate"],
select[name="month_birthdate"]
{
display: none;
}
</style>
Then, in the field "Custom tail code", enter the following:
<script>
window.onload = (event) => {
// Auto-fill Day and Month on join-form page
document.getElementById("joinForm").querySelectorAll('select[name^="month_"], select[name^="day_"]').forEach(el => {
el.value = "1";
});
// Auto-fill Day and Month on profile edit page
document.getElementsByName("day_birthdate")[0].value = "1";
document.getElementsByName("month_birthdate")[0].value = "1";
};
</script>
Then remember to hit "Save".
This should set the default day and month to January 1st, and hide those fields from view.
This seems to work fine, but of course, you should test it carefully before using it, as it may still introduce unexpected results.
Brilliant!
I think it will work, except for plugins that congratulate for the birthday or give the horoscope because everyone will be Capricorn, hahaha!
My website is age sensitive, not porn lol, but aggressive debating with a lot of cursing etc, so I want to be able to nip it in the bud at registration to try and avoid liability issues.
Now when you add it as a question it does not validate the age, well at least I didn't see an option for that.
I also tried an age verification service, before getting to the site, but to have to constantly type in or select your year of birth can get annoying. While you can set the cookie for 30 days a lot of user's delete cookies at exit.
Thanks.
Hi, i totally understand your situation. Many just jump right into doing a website and never consider the liability end of it, so its great that you are working to limit your exposure. And that exposure is only going to get more not less as global privacy and other policies change.
Have you gotten your LLC yet, that is one huge step in the right direction.
So i assume you are not marketing to 13 or under and not going to have to abide by COPPA
www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule
Also be carefull if you dont want to use the month and day as this could make the difference between legal and illegal.
Question, do you need to use the age or year of birth for anything else other than age verification?
Once they state the year they were born, its out of our hands.
We also added it, as you can see in the picture, where they must select they agree with the terms. And I also placed it in the terms lol.
As for the LLC I want to see how things go before investing in becoming an LLC.
Thxs
Lastly
THE CODE WORKED GREAT. THANKS DEV !!!!!!!!!! You the best.
Nice job dev, thanks for the help... :) Yep looks good...
I understand, everyone wants to make sure what they are doing is viable before they jump in, thats just good business sense. But just in case you dont, do you know how a LLC works and what it does for you?
if you do then your ahead of the ball. If not i can explain...
However any old members that did not enter the year of birth are required to enter the full date of birth and since you can only see the year it will not allow the year entry only.
Any sugestions?
Sounds like there may have to be some table editing involved for the previous users. How many users are we talking about 100, less than 500, 1000+
A query can be done to do it if there are too many to do manually.
I am not an attorney and not giving legal advice, for that please consult an attorney.
As for the LLC it depends on the state, the state i used to live in the LLC was only $50 one time fee, yes some can be $500 or more. But it does not obsolve all liability, it regulates it.
Basically the nuts and bolts of it are.
You have business operating agreement (mine was 75 pages long) which describes in detail how you run your business, yes in almost every detail.
If you have an LLC and someone sues you, the judge will ask for evidence that you have run your business according to your operating agreement. If he finds that you have done so then your personal property is protected, however if he finds that you didnt keep up with your books and didnt run your plan according to the agreement, then your personal property and business property both are up for grabs.
That is basically it in a nutshell, it basically protects your personal property when things go right. So people that are running websites with no coverage at all risk their personal property.
<script>
window.onload = (event) => {
if (document.getElementById("joinForm")) {
// Auto-fill Day and Month on join-form page
document.getElementById("joinForm").querySelectorAll('select[name^="month_"], select[name^="day_"]').forEach(el => {
el.value = "1";
})
}
if (document.getElementsByName("day_birthdate")[0]) {
// Auto-fill Day and Month on profile edit & complete profile pages
document.getElementsByName("day_birthdate")[0].value = "1";
document.getElementsByName("month_birthdate")[0].value = "1";
}
}
</script>