address-form-oraclejet
v0.2.0
Published
An address form composite component that you can use in your Oracle JET application.
Downloads
2
Readme
address-form-oraclejet
An address form composite component that you can use in your Oracle JET application.
Usage
In your HTML:
<div id="composite-container">
<address-form fields='["name", "address", "city"]'></address-form>
</div>
In your JS:
require([
'ojs/ojcore',
'knockout',
'jquery',
'ojs/ojknockout',
'ojs/ojcomposite',
// remember to load address-form-oraclejet via requirejs' paths, so you can do:
'address-form-oraclejet/loader'
],
function(oj, ko, $) {
// do your oraclejet setup stuff here
// ...
// to subscribe to the submit event of the address-form component, do:
window.addEventListener('address-form:submit', function (event) {
console.log(event.detail); // logs the form data as an object
});
}
);