Forms

Forms The same can be used with form data. You might have created forms previous to this in HTML but without some sort of server side language, there is a very limited number of things you can do with that data. Now when we submit a form we can use the variables submitted in our page. Fill out and submit this form:

First Name First Name Last Name Last Name Email address name@example.com

Form Data - FORM Scope: 0 See the output above? The form data is in a Struct called Form. We can access the individual pieces typing form.variablename.

A form has several different tags in it. Here are the basics:
- The tag has two essential properties. The first is the action property. This is the file to which the browser will pass the form variables. Put another way, it's the page that will load when you submit the form. In this case, we are using BoxLang variables that will automatically put the name of the same page. If you use this, don't forget to wrap it in The "method" property says how the variables will be submitted. The two most common methods are and . For the moment, let's keep it simple. Using "get" will put the variables and their values in the address bar or in the URL scope. Using "post" will submit them another way which is behind the scenes, not in the URL. - The input tag defines a place to put in a variable. You name the variable by using the "name" property in the tag. The value is whatever is entered by the user or you predefine with the value property. - The creates a button that will submit the form. You can also use a
Lesson 8 of 12 - Learn BoxLang