Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update readme

  • Loading branch information...
commit 24a09e5cfbfd50fdb500a1313ad5598eae89707c 1 parent 87891ec
@activestylus authored
Showing with 20 additions and 19 deletions.
  1. +20 −19 README.markdown
View
39 README.markdown
@@ -25,25 +25,6 @@ The heart of **PadrinoFields** is the **:input** method
This will generate a form with labels for username and password - supplying the appropriate inputs, labels and error messages on missing/invalid fields. **PadrinoFields** looks at your database columns to generate default inputs.
-## Available Inputs
-
-Mapping | Input | Column Type
-:-------------|:----------------|:------------------------------------
-**:boolean** |check box |boolean
-**:string** |text field |string
-**:email** |email field |string with name matching "email"
-**:url** |url field |string with name matching "url"
-**:tel** |tel field |string with name matching "phone"
-**:password** |password field |string with name matching "password"
-**:search** |search |string with name matching "search"
-**:text** |text area |text
-**:file** |file field |string, responding to file methods
-**:number** |number field |integer, float, decimal
-**:date** |date field |date, datetime, timestamps
-**:select** |select |-
-**:radios** |radio buttons |-
-**:checks** |check boxes |-
-
## Field Customization
Override the default input type like so:
@@ -69,6 +50,26 @@ Pass html attribute straight to the input:
= f.input :password, :input_html => { :maxlength => 20 }
= f.input :remember_me, :input_html => { :value => '1' }
+ ## Available Inputs
+
+ Mapping | Input | Column Type
+ :-------------|:----------------|:------------------------------------
+ **:boolean** |check box |boolean
+ **:string** |text field |string
+ **:email** |email field |string with name matching "email"
+ **:url** |url field |string with name matching "url"
+ **:tel** |tel field |string with name matching "phone"
+ **:password** |password field |string with name matching "password"
+ **:search** |search |string with name matching "search"
+ **:text** |text area |text
+ **:file** |file field |string, responding to file methods
+ **:number** |number field |integer, float, decimal
+ **:date** |date field |date, datetime, timestamps
+ **:select** |select |-
+ **:radios** |radio buttons |-
+ **:checks** |check boxes |-
+
+
## Validations
By default all inputs are optional. **PadrinoFields** looks at your model validations to see if a field's presence is required and will mark it by prepending a * to the label.
Please sign in to comment.
Something went wrong with that request. Please try again.