cakephp-1.3 > JsHelper :: submit()
A AclBase AclBehavior AclComponent AclNode AclShell Aco AcoAction AjaxHelper ApcEngine ApiShell App AppController AppController AppHelper AppHelper AppModel AppModel Aro AuthComponent B BakeShell BakeTask BehaviorCollection C Cache CacheEngine CacheHelper CakeErrorController CakeLog CakeRoute CakeSchema CakeSession CakeSocket ClassRegistry Component Configure ConnectionManager ConsoleShell ContainableBehavior Controller ControllerTask CookieComponent D DataSource DbAcl DbAclSchema DbConfigTask DboMssql DboMysql DboMysqlBase DboMysqli DboOracle DboPostgres DboSource DboSqlite Debugger Dispatcher E EmailComponent ErrorHandler ErrorHandler ExtractTask F File FileEngine FileLog FixtureTask Folder FormHelper H Helper HtmlHelper HttpSocket I I18n I18nModel i18nSchema I18nShell Inflector IniAcl J JavascriptHelper JqueryEngineHelper JsBaseEngineHelper JsHelper L L10n M MagicDb MagicFileResource MediaView MemcacheEngine Model ModelBehavior ModelTask MootoolsEngineHelper Multibyte N NumberHelper O Object Overloadable Overloadable Overloadable2 Overloadable2 P PagesController PagesController PaginatorHelper Permission PluginShortRoute PluginTask ProjectTask PrototypeEngineHelper R RequestHandlerComponent Router RssHelper S Sanitize Scaffold ScaffoldView SchemaShell Security SecurityComponent SessionComponent SessionHelper SessionsSchema Set Shell ShellDispatcher String T TemplateTask TestSuiteShell TestTask TextHelper ThemeView TimeHelper TranslateBehavior TreeBehavior V Validation View ViewTask X XcacheEngine Xml XmlElement XmlHelper XmlManager XmlNode XmlTextNode

submit

line:381 at /cake/libs/view/helpers/js.php
Uses the selected JS engine to create a submit input element that is enhanced with Javascript. Options can include both those for FormHelper::submit() and JsBaseEngine::request(), JsBaseEngine::event();

Method

(string) submit ($caption = null, $options = array())

Parameters

ParameterTypeCommentDefault
$caption ? string optional The display text of the submit button. null
$options array optional Array of options to use. See the options for the above mentioned methods. array()

Return

string

Comment

Uses the selected JS engine to create a submit input
element that is enhanced with Javascript. Options can include
both those for FormHelper::submit() and JsBaseEngine::request(), JsBaseEngine::event();

Forms submitting with this method, cannot send files. Files do not transfer over XmlHttpRequest
and require an iframe or flash.

### Options

- `url` The url you wish the XHR request to submit to.
- `confirm` A string to use for a confirm() message prior to submitting the request.
- `method` The method you wish the form to send by, defaults to POST
- `buffer` Whether or not you wish the script code to be buffered, defaults to true.
- Also see options for JsHelper::request() and JsHelper::event()

@param string $title The display text of the submit button.
@param array $options Array of options to use. See the options for the above mentioned methods.
@return string Completed submit button.
@access public