Data Binding
You can bind your data properties to input elements within your template using wire:model.
// wires/MyComponent.bx
class extends="cbwire.models.Component" {
// Data properties
data = {
"name": ""
};
}// wires/MyComponent.cfc
component extends="cbwire.models.Component" {
// Data properties
data = {
"name": ""
};
}<!--- ./wires/MyComponent.bxm|cfm --->
<div>
<form>
<input wire:model.live="name" type="text">
Name updated at #now()#
</form>
</div>Resources
See the wire:model page for complete documentation.
Last updated
Was this helpful?