Css Form Essays
Email Input Fields
The element’s attribute also lets you do basic input validation. For example, let’s try adding another input element that only accepts email addresses instead of arbitrary text values:
This works exactly like the input, except it automatically checks that user entered an email address. In Firefox, you can try typing something that’s not an email address, then clicking outside of the field to make it lose focus and validate its input. It should turn red to show the user that it’s an incorrect value. Chrome and Safari don’t attempt to validate until user tries to submit the form, so we’ll see this in action later in this chapter.
This is more than just validation though. By telling browsers that we’re looking for an email address, they can provide a more intuitive user experience. For instance, when a smartphone browser sees this attribute, it gives the user a special email-specific keyboard with an easily-accessible character.
Also notice the new attribute that lets you display some default text when the element is empty. This is a nice little UX technique to prompt the user to input their own value.
There’s a bunch of other built-in validation options besides email addresses, which you can read about on MDN’s reference. Of particular interest are the , , , and attributes.
Styling Email Input Fields
We want our email field to match our text field from the previous section, so let’s add another attribute selector to the existing rule, like so:
Again, we don’t want to use a plain old type selector here because that would style all of our elements, including our upcoming radio buttons and checkbox. This is part of what makes styling forms tricky. Understanding the CSS to pluck out exactly the elements you want is a crucial skill.
Let’s not forget about our desktop styles. Update the corresponding rule in our media query to match the following (note that we’re preparing for the next few sections with the , and selectors):
Since we can now have a “right” and a “wrong” input value, we should probably convey that to users. The and pseudo-classes let us style these states independently. For example, maybe we want to render both the border and the text with a custom shade of red when the user entered an unacceptable value. Add the following rule to our stylesheet, outside of the media query:
Until we include a submit button, you’ll only be able to see this in Firefox, but you get the idea. There’s a similar pseudo-class called that selects the element the user is currently filling out. This gives you a lot of control over the appearance of your forms.
Heads up: This article is out of date! Find current financial aid information here.
While the US Department of Education is working on simplifying the Free Application for Federal Student Aid (FAFSA), the College Board has already been taking similar steps toward simplifying the CSS/Financial Aid PROFILE form.
The CSS/Financial Aid PROFILE form tries to calculate a more precise measurement of ability to pay. This necessarily involves asking more questions than on the FAFSA. However, some of the same techniques that are being used to simply the FAFSA are also effective for the PROFILE. In fact, skip logic is more effective in simplifying the adaptive version of the PROFILE for low-income students because of the greater initial complexity of the form.
According to Myra Smith, executive director for financial aid services at the College Board, “the PROFILE application has used processes very similar to the skip logic now in the FAFSA for the past 3 years.”
The registration section of the PROFILE application starts off with a set of basic questions that are used to provide the student with an application that is customized to their circumstances. The answers to these questions can trigger the inclusion or exclusion of other sections of the form. For example, if the family owns a home, there will be additional questions about home value, mortgage debt and loan payments. Otherwise there will be questions about monthly rent payments. If the family owns a business, the form adds questions about the business. The type of tax form filed will also affect the number of questions asked.
The number of questions on the application ranges from as few as 50 questions to as many as 130 questions. For families who receive SSI or TANF, most of the asset and income questions as well as many of the college-specific supplemental questions are eliminated. This yields a much simpler application. The PROFILE application also automates the fee waiver process for low-income students.
Ms. Smith says “we support and are enthusiastic about the efforts of the Department to simplify the FAFSA as a step to reduce barriers for low-income students.” The College Board’s philosophy focuses on simplifying the PROFILE application for low-income students while retaining necessary detail for moderate and upper-income families, especially those with complicated financial situations. This permits the PROFILE to give college financial aid administrators enough information to determine relative financial strength for a diverse range of families for awarding the college’s own financial aid funds.
The College Board reviews the PROFILE application annually for additional ways to improve and simplify the form. This year they added the ability for international students to report figures in their own currency and merged some of the questions on a supplemental paper form for business owners into the online application.
Demonstration versions of the adaptive PROFILE form, including the simplest application form, can be found on the College Board’s web site.
Need Money to Pay for College?
Every semester, Fastweb helps thousands of students pay for school by matching them to scholarships, grants, and internships, for which they actually qualify. You'll find high value scholarships like VIP Voice's $5,000 Scholarship, and easy to enter scholarships like Niche $2,000 No Essay Scholarship, and internships with companies like Apple, Google, Dreamworks, and even NASA!
Join today to get matched to scholarships or internships for you!