SlideShare a Scribd company logo
1 of 15
Forme CodeIgniter
Form Helper
• Realizati un proiect nou si eliminati index.php din adresa.
FormsController
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class FormsController extends CI_Controller {
public function index()
{
$this->load->view('forma');
}
}
• In fisierul de routare editati:
$route['default_controller'] = ‘FormsController';
Vederea forma
• Fisierul Form Helper contine functii care faciliteaza lucrul cu forme.
<?php
$this->load->helper('form');
echo form_open();
#<form
action="http://127.0.0.1/CIgniter3/index.php/FormsController"
method="post" accept-charset="utf-8">
#text control
$data = ['name' => 'text1',
'id' => 'text1',
'value' => 'ura',
'maxlength' => '100',
'size' => '30',
];
#label
echo form_label('Username ', 'text1');
echo form_input($data);
echo "<br><br>";
#<label for="text1">Username </label><input type="text"
name="text1" value="ura" id="text1" maxlength="100" size="30" />
#password control
$pass = ['name' => 'pass1',
'id' => 'pass1',
'maxlength' => '100',
'size' => '30',
];
echo form_label('Password ', 'pass1');
echo form_password($pass);
echo "<br><br>";
#<br><br><label for="pass1">Password </label><input
type="password" name="pass1" value="" id="pass1" maxlength="100"
size="30" />
#textarea
$text1 = ['name' => 'textarea1',
'id' => 'textarea1',
'value' => 'ura',
'rows' => '5',
'cols' => '30',
];
#label
echo form_label('Details ', 'textarea1');
echo form_textarea($text1);
echo "<br><br>";
#<label for="textarea1">Details </label><textarea name="textarea1"
cols="30" rows="5" id="textarea1" >ura</textarea>
#fieldset
echo form_fieldset('Checkbox');
#checkbox1
$check1 = ['name' => 'check1',
'id' => 'check1',
'value' => 'check1',
];
#label
echo form_label('Elev ', 'check1');
echo form_checkbox($check1);
echo "<br><br>";
#checkbox2
$check2 = ['name' => 'check2',
'id' => 'check2',
'value' => 'check2',
];
#label
echo form_label('Student ', 'check2');
echo form_checkbox($check2);
#fieldset close
echo form_fieldset_close();
echo "<br><br>";
#<fieldset>
#<legend>Checkbox</legend>
#<label for="check1">Elev </label><input type="checkbox" name="check1" value="check1"
id="check1" />
#<br><br><label for="check2">Student </label><input type="checkbox" name="check2"
value="check2" id="check2" />
#</fieldset>
#fieldset
echo form_fieldset('Radio');
#radio1
$radio1=['name' => 'radio1',
'id' => 'radio1',
'value' => 'Male',
'checked'=>set_radio('gender', 'Male', FALSE),
];
#label
echo form_label('Male ', 'radio1');
echo form_radio($radio1);
#radio2
$radio2=['name' => 'radio1',
'id' => 'radio1',
'value' => 'Female',
'checked'=>set_radio('gender', 'Female', FALSE),
];
#label
echo form_label('Female ', 'radio2');
echo form_radio($radio2);
#fieldset close
echo form_fieldset_close();
echo "<br><br>";
#<fieldset>
#<legend>Radio</legend>
#<label for="radio1">Male </label><input type="radio" name="radio1" value="Male" id="radio1" />
#<label for="radio2">Female </label><input type="radio" name="radio1" value="Female" id="radio1" />
#</fieldset>
#combobox
$drop=[
'small'=>'Small',
'medium'=>'Medium',
'large'=>'Large',
'xlarge'=>'Extra Large',
];
#label
echo form_label('Choose: ', '');
echo form_dropdown('drop ', $drop,'medium');
echo "<br><br>";
#<label>Choose: </label><select name="drop ">
#<option value="small">Small</option>
#<option value="medium" selected="selected">Medium</option>
#<option value="large">Large</option>
#<option value="xlarge">Extra Large</option>
#</select>
#listbox
$list=[
'small'=>'Small',
'medium'=>'Medium',
'large'=>'Large',
'xlarge'=>'Extra Large',
];
#label
echo form_label('Choose: ', '');
echo form_multiselect('select[]', $list ,'medium');
echo "<br><br>";
#<label>Choose: </label><select name="select[]" multiple="multiple">
#<option value="small">Small</option>
#<option value="medium" selected="selected">Medium</option>
#<option value="large">Large</option>
#<option value="xlarge">Extra Large</option>
#</select>
#submit button
echo form_submit('submit', 'Submit!');
#<input type="submit" name="submit" value="Submit!" />
#reset button
echo form_reset('reset','Reset');
#<input type="reset" name="reset" value="Reset" />
echo form_close();

More Related Content

What's hot

Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injectionEyal Vardi
 
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time CompilationAngular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time CompilationEyal Vardi
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2Eyal Vardi
 
Resource and view
Resource and viewResource and view
Resource and viewPapp Laszlo
 
A multi submission importer for easyform
A multi submission importer for easyformA multi submission importer for easyform
A multi submission importer for easyformAnnette Lewis
 
Cloud Entwicklung mit Apex
Cloud Entwicklung mit ApexCloud Entwicklung mit Apex
Cloud Entwicklung mit ApexAptly GmbH
 
AngularJS $Provide Service
AngularJS $Provide ServiceAngularJS $Provide Service
AngularJS $Provide ServiceEyal Vardi
 
Alfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Software
 
Understanding form helpers
Understanding form helpersUnderstanding form helpers
Understanding form helpersBruno Almeida
 
PLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and ExtensionPLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and ExtensionAlfresco Software
 
WordPress - Custom Page Settings + Salesforce API Integration
WordPress - Custom Page Settings + Salesforce API IntegrationWordPress - Custom Page Settings + Salesforce API Integration
WordPress - Custom Page Settings + Salesforce API IntegrationKhoi Nguyen
 
Introduction to UI Components in Magento 2
Introduction to UI Components in Magento 2Introduction to UI Components in Magento 2
Introduction to UI Components in Magento 2Sergii Ivashchenko
 
Magento 2 UI Components Overview
Magento 2 UI Components OverviewMagento 2 UI Components Overview
Magento 2 UI Components OvervieweGlobe IT Solutions
 
2018 UI5con Drag-and-Drop Concept
2018 UI5con Drag-and-Drop Concept2018 UI5con Drag-and-Drop Concept
2018 UI5con Drag-and-Drop Conceptaborjinik
 
Databinding and Performance-Tuning in Angular 2
Databinding and Performance-Tuning in Angular 2Databinding and Performance-Tuning in Angular 2
Databinding and Performance-Tuning in Angular 2Manfred Steyer
 

What's hot (18)

Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injection
 
Reusable ui components
Reusable ui componentsReusable ui components
Reusable ui components
 
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time CompilationAngular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time Compilation
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2
 
Resource and view
Resource and viewResource and view
Resource and view
 
A multi submission importer for easyform
A multi submission importer for easyformA multi submission importer for easyform
A multi submission importer for easyform
 
Cloud Entwicklung mit Apex
Cloud Entwicklung mit ApexCloud Entwicklung mit Apex
Cloud Entwicklung mit Apex
 
AngularJS $Provide Service
AngularJS $Provide ServiceAngularJS $Provide Service
AngularJS $Provide Service
 
Alfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Forms Service Deep Dive
Alfresco Forms Service Deep Dive
 
Routing to components
Routing to componentsRouting to components
Routing to components
 
Understanding form helpers
Understanding form helpersUnderstanding form helpers
Understanding form helpers
 
PLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and ExtensionPLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and Extension
 
WordPress - Custom Page Settings + Salesforce API Integration
WordPress - Custom Page Settings + Salesforce API IntegrationWordPress - Custom Page Settings + Salesforce API Integration
WordPress - Custom Page Settings + Salesforce API Integration
 
Introduction to UI Components in Magento 2
Introduction to UI Components in Magento 2Introduction to UI Components in Magento 2
Introduction to UI Components in Magento 2
 
Built in filters
Built in filtersBuilt in filters
Built in filters
 
Magento 2 UI Components Overview
Magento 2 UI Components OverviewMagento 2 UI Components Overview
Magento 2 UI Components Overview
 
2018 UI5con Drag-and-Drop Concept
2018 UI5con Drag-and-Drop Concept2018 UI5con Drag-and-Drop Concept
2018 UI5con Drag-and-Drop Concept
 
Databinding and Performance-Tuning in Angular 2
Databinding and Performance-Tuning in Angular 2Databinding and Performance-Tuning in Angular 2
Databinding and Performance-Tuning in Angular 2
 

Similar to 3. Forme CodeIgniter

Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment systempranoy_seenu
 
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...sriram sarwan
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web formsCK Yang
 
BITM3730Week11.pptx
BITM3730Week11.pptxBITM3730Week11.pptx
BITM3730Week11.pptxMattMarino13
 
Ctools presentation
Ctools presentationCtools presentation
Ctools presentationDigitaria
 
22. Integrarea unui sablon bootstrap in code igniter
22. Integrarea unui sablon bootstrap in code igniter22. Integrarea unui sablon bootstrap in code igniter
22. Integrarea unui sablon bootstrap in code igniterRazvan Raducanu, PhD
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysqlKnoldus Inc.
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleKaty Slemon
 
前后端mvc经验 - webrebuild 2011 session
前后端mvc经验 - webrebuild 2011 session前后端mvc经验 - webrebuild 2011 session
前后端mvc经验 - webrebuild 2011 sessionRANK LIU
 
Task scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialTask scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialKaty Slemon
 
Web internship Yii Framework
Web internship  Yii FrameworkWeb internship  Yii Framework
Web internship Yii FrameworkNoveo
 
Empowering users: modifying the admin experience
Empowering users: modifying the admin experienceEmpowering users: modifying the admin experience
Empowering users: modifying the admin experienceBeth Soderberg
 

Similar to 3. Forme CodeIgniter (20)

5. CodeIgniter copy1
5. CodeIgniter copy15. CodeIgniter copy1
5. CodeIgniter copy1
 
6. CodeIgniter copy2
6. CodeIgniter copy26. CodeIgniter copy2
6. CodeIgniter copy2
 
4. CodeIgniter Greeting
4. CodeIgniter Greeting4. CodeIgniter Greeting
4. CodeIgniter Greeting
 
Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment system
 
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web forms
 
2. CodeIgniter 2
2. CodeIgniter 22. CodeIgniter 2
2. CodeIgniter 2
 
BITM3730Week11.pptx
BITM3730Week11.pptxBITM3730Week11.pptx
BITM3730Week11.pptx
 
Ctools presentation
Ctools presentationCtools presentation
Ctools presentation
 
22. Integrarea unui sablon bootstrap in code igniter
22. Integrarea unui sablon bootstrap in code igniter22. Integrarea unui sablon bootstrap in code igniter
22. Integrarea unui sablon bootstrap in code igniter
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
 
前后端mvc经验 - webrebuild 2011 session
前后端mvc经验 - webrebuild 2011 session前后端mvc经验 - webrebuild 2011 session
前后端mvc经验 - webrebuild 2011 session
 
Code Igniter 2
Code Igniter 2Code Igniter 2
Code Igniter 2
 
Task scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialTask scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorial
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorppt
 
Web internship Yii Framework
Web internship  Yii FrameworkWeb internship  Yii Framework
Web internship Yii Framework
 
CodeIgniter Framework
CodeIgniter FrameworkCodeIgniter Framework
CodeIgniter Framework
 
Empowering users: modifying the admin experience
Empowering users: modifying the admin experienceEmpowering users: modifying the admin experience
Empowering users: modifying the admin experience
 

More from Razvan Raducanu, PhD (20)

12. edit record
12. edit record12. edit record
12. edit record
 
11. delete record
11. delete record11. delete record
11. delete record
 
10. view one record
10. view one record10. view one record
10. view one record
 
9. add new record
9. add new record9. add new record
9. add new record
 
8. vederea inregistrarilor
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilor
 
7. copy1
7. copy17. copy1
7. copy1
 
6. hello popescu 2
6. hello popescu 26. hello popescu 2
6. hello popescu 2
 
5. hello popescu
5. hello popescu5. hello popescu
5. hello popescu
 
4. forme in zend framework 3
4. forme in zend framework 34. forme in zend framework 3
4. forme in zend framework 3
 
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
 
2.routing in zend framework 3
2.routing in zend framework 32.routing in zend framework 3
2.routing in zend framework 3
 
1. zend framework intro
1. zend framework intro1. zend framework intro
1. zend framework intro
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
 
17. delete data
17. delete data17. delete data
17. delete data
 
16. edit data
16. edit data16. edit data
16. edit data
 
15. view single data
15. view single data15. view single data
15. view single data
 
14. add data in symfony4
14. add data in symfony4 14. add data in symfony4
14. add data in symfony4
 
13. view data
13. view data13. view data
13. view data
 
12.doctrine view data
12.doctrine view data12.doctrine view data
12.doctrine view data
 
11. move in Symfony 4
11. move in Symfony 411. move in Symfony 4
11. move in Symfony 4
 

Recently uploaded

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 

Recently uploaded (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

3. Forme CodeIgniter

  • 2. • Realizati un proiect nou si eliminati index.php din adresa.
  • 3. FormsController <?php defined('BASEPATH') OR exit('No direct script access allowed'); class FormsController extends CI_Controller { public function index() { $this->load->view('forma'); } }
  • 4. • In fisierul de routare editati: $route['default_controller'] = ‘FormsController';
  • 5. Vederea forma • Fisierul Form Helper contine functii care faciliteaza lucrul cu forme. <?php $this->load->helper('form'); echo form_open(); #<form action="http://127.0.0.1/CIgniter3/index.php/FormsController" method="post" accept-charset="utf-8">
  • 6. #text control $data = ['name' => 'text1', 'id' => 'text1', 'value' => 'ura', 'maxlength' => '100', 'size' => '30', ]; #label echo form_label('Username ', 'text1'); echo form_input($data); echo "<br><br>"; #<label for="text1">Username </label><input type="text" name="text1" value="ura" id="text1" maxlength="100" size="30" />
  • 7. #password control $pass = ['name' => 'pass1', 'id' => 'pass1', 'maxlength' => '100', 'size' => '30', ]; echo form_label('Password ', 'pass1'); echo form_password($pass); echo "<br><br>"; #<br><br><label for="pass1">Password </label><input type="password" name="pass1" value="" id="pass1" maxlength="100" size="30" />
  • 8. #textarea $text1 = ['name' => 'textarea1', 'id' => 'textarea1', 'value' => 'ura', 'rows' => '5', 'cols' => '30', ]; #label echo form_label('Details ', 'textarea1'); echo form_textarea($text1); echo "<br><br>"; #<label for="textarea1">Details </label><textarea name="textarea1" cols="30" rows="5" id="textarea1" >ura</textarea>
  • 9. #fieldset echo form_fieldset('Checkbox'); #checkbox1 $check1 = ['name' => 'check1', 'id' => 'check1', 'value' => 'check1', ]; #label echo form_label('Elev ', 'check1'); echo form_checkbox($check1); echo "<br><br>";
  • 10. #checkbox2 $check2 = ['name' => 'check2', 'id' => 'check2', 'value' => 'check2', ]; #label echo form_label('Student ', 'check2'); echo form_checkbox($check2); #fieldset close echo form_fieldset_close(); echo "<br><br>"; #<fieldset> #<legend>Checkbox</legend> #<label for="check1">Elev </label><input type="checkbox" name="check1" value="check1" id="check1" /> #<br><br><label for="check2">Student </label><input type="checkbox" name="check2" value="check2" id="check2" /> #</fieldset>
  • 11. #fieldset echo form_fieldset('Radio'); #radio1 $radio1=['name' => 'radio1', 'id' => 'radio1', 'value' => 'Male', 'checked'=>set_radio('gender', 'Male', FALSE), ]; #label echo form_label('Male ', 'radio1'); echo form_radio($radio1);
  • 12. #radio2 $radio2=['name' => 'radio1', 'id' => 'radio1', 'value' => 'Female', 'checked'=>set_radio('gender', 'Female', FALSE), ]; #label echo form_label('Female ', 'radio2'); echo form_radio($radio2); #fieldset close echo form_fieldset_close(); echo "<br><br>"; #<fieldset> #<legend>Radio</legend> #<label for="radio1">Male </label><input type="radio" name="radio1" value="Male" id="radio1" /> #<label for="radio2">Female </label><input type="radio" name="radio1" value="Female" id="radio1" /> #</fieldset>
  • 13. #combobox $drop=[ 'small'=>'Small', 'medium'=>'Medium', 'large'=>'Large', 'xlarge'=>'Extra Large', ]; #label echo form_label('Choose: ', ''); echo form_dropdown('drop ', $drop,'medium'); echo "<br><br>"; #<label>Choose: </label><select name="drop "> #<option value="small">Small</option> #<option value="medium" selected="selected">Medium</option> #<option value="large">Large</option> #<option value="xlarge">Extra Large</option> #</select>
  • 14. #listbox $list=[ 'small'=>'Small', 'medium'=>'Medium', 'large'=>'Large', 'xlarge'=>'Extra Large', ]; #label echo form_label('Choose: ', ''); echo form_multiselect('select[]', $list ,'medium'); echo "<br><br>"; #<label>Choose: </label><select name="select[]" multiple="multiple"> #<option value="small">Small</option> #<option value="medium" selected="selected">Medium</option> #<option value="large">Large</option> #<option value="xlarge">Extra Large</option> #</select>
  • 15. #submit button echo form_submit('submit', 'Submit!'); #<input type="submit" name="submit" value="Submit!" /> #reset button echo form_reset('reset','Reset'); #<input type="reset" name="reset" value="Reset" /> echo form_close();