Thread: Form Building
View Single Post
  #2  
Old 12-18-2015, 09:42 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 605,117
Hall of Famer is on a distinguished road
Default

Well you can create/edit a form in a view class file(located at /view folder or admincp/view folder), and use Mysidia's Form or FormBuilder class. Below is an example of how to use the form builder:

PHP Code:
$form = new FormBuilder("login""""post"); 
$form->buildComment("username: "FALSE
     ->
buildTextField("username"
     ->
buildComment("password: "FALSE
     ->
buildPasswordField("password""pass"""TRUE
     ->
buildButton("Submit""submit""submit"); 
The above example creates a login form, similar to Mysidia's login form. You can look into the file class_form.php and class_formbuilder.php to see what methods these classes have for you to create a form dynamically.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote