__construct () RocksForm costrutto __ ()
Aggiunge un uguale a confronto. Ciò verifica che i valori dei campi sono uguali se non sono allora il messaggio viene visualizzato.
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddEqualToComparison (string $ itemOne, string $ itemTwo, string $ message)
- $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di confrontare
- $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
- $message : this is message that is displayed if the fields are not equal stringa $ messaggio: questo è il messaggio che viene visualizzato se i campi non sono uguali
Questo metodo aggiunge un altro campo al form. È necessario aggiungere un campo al form per restituire il valore in un array associativo, nonché per eseguire valudation su di esso.
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) vuoto AddField (string $ name, string $ type, string $ isRequired, [string $ formName = null], [string $ default = null])
- $name : this is the name of the form field stringa $ nome: questo è il nome del campo del form
- $type : this is the type of the form field string $ type: questo è il tipo del campo di modulo
- $isRequired : this indicates if the field is a required field stringa $ isRequired: indica se il campo è un campo obbligatorio
- $formName : this is the form name that field is part of. stringa $ formName: è questo il nome del modulo che il campo fa parte. Questo non è necessaria se vi è solo una forma
- $default : this is the default value of the field if it is left empty. $ stringa di default: questo è il valore predefinito del campo, se viene lasciato vuoto.
Ciò aggiunge un identificatore unico modulo questo indica che un campo modulo appartiene solo una delle forme nella pagina. Nota: avete solo bisogno di utilizzare questo metodo se ci sono più di un modulo a una pagina.
AddFormIdentifier ( string $fieldName , string $formName ) vuoto AddFormIdentifier (string $ fieldName, string $ formName)
- $fieldName : this is the field name that uniquely identifies the form stringa $ fieldName: è questo il nome del campo che identifica in modo univoco la forma
- $formName : this is the form name that you want to assign to the form stringa $ formName: è questo il nome del modulo che si desidera assegnare alla forma
Aggiunge un elemento uno è più grande voce di due confronto. Ciò verifica che i valori del modulo elemento di campo è più grande di due voce se non sono allora il messaggio viene visualizzato.
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneGreaterThanTwoComparison (string $ itemOne, string $ itemTwo, string $ message)
- $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di confrontare
- $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
- $message : this is message that is displayed if the validation fails stringa $ messaggio: questo è il messaggio che viene visualizzato se la convalida non riesce
Aggiunge un elemento sia inferiore voce di due confronto. Ciò verifica che i valori dell'elemento campo modulo sia inferiore elemento due se non sono allora il messaggio viene visualizzato.
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneLessThanTwoComparison (string $ itemOne, string $ itemTwo, string $ message)
- $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di confrontare
- $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
- $message : this is message that is displayed if the validation fails stringa $ messaggio: questo è il messaggio che viene visualizzato se la convalida non riesce
Aggiunge una non uguale a confronto. Ciò verifica che i valori dei campi modulo non sono uguali, se non vengono quindi il messaggio viene visualizzato.
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddNotEqualToComparison (string $ itemOne, string $ itemTwo, string $ message)
- $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di confrontare
- $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
- $message : this is message that is displayed if the fields are equal stringa $ messaggio: questo è il messaggio che viene visualizzato se i campi sono uguali
Questo restituisce un array associativo con il nome di campo come chiave e il valore del campo come valore.
GetAssociativeArrayData () GetAssociativeArrayData vuoto ()
Questo restituisce la forma che ha appena pubblicato indietro.
GetCurrentForm () GetCurrentForm vuoto ()
Questo restituisce una serie di messaggi di errore. Questo assicura anche che il modulo è stato convalidato, se questo si chiama.
GetErrors () annullare GetErrors ()
Questo metodo restituisce un campo in base al suo nome
- $name : this is the name of the form field to return stringa $ nome: questo è il nome del campo form per tornare
Questo imposta il tipo di modulo
SetFormType ( string $type ) vuoto SetFormType (string $ type)
- $type : this sets the type of form RocksPost or RocksGet string $ type: imposta il tipo di forma o RocksPost RocksGet
Questo modo si controlla che tutti i campi del modulo passare tutti i test di validazione.
Validate () annullare Validate ()