Skip to content

Instantly share code, notes, and snippets.

@vvscode
Created April 23, 2015 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvscode/da22227412472060f99c to your computer and use it in GitHub Desktop.
Save vvscode/da22227412472060f99c to your computer and use it in GitHub Desktop.
Example for using components
// Example for using formConfig
var fields = [
{
"name":"payment_approved",
"type":"checkbox-field",
"label":"Payment Approved:"
},
{
"name":"associated_contact",
"type":"contact-select",
"label":"Associated Contact:"
},
{
"dividerBefore":"<hr/>",
"name":"invoice_date",
"type":"datepicker-field",
"label":"Invoice Date:",
"dividerAfter":"<br/>"
},
{
"name":"lot_numberv",
"type":"input-field",
"label":"Lot #:"
},
{
"name":"low_estimate",
"currency":"controller.currency",
"type":"money-component",
"label":"Low Estimate:"
},
{
"name":"tax_on_hammer_price_amount",
"type":"money-or-percent-component",
"currency":"controller.currency",
"is_percentage":"tax_on_hammer_price_is_percentage",
"label":"Tax on Hammer Price:"
},
{
"type":"read-mode-key-link",
"name":"associated_contact.display_name",
"link":"contact.info",
"params":[
"associated_contact.id"
],
"label":"Associated Contact:"
},
{
"type":"read-mode-key-money",
"name":"cache.total_low_estimate",
"label":"Total Low Estimate:",
"currency":"currency.symbol"
},
{
"type":"read-mode-key-value",
"name":"invoice_number",
"label":"Invoice #:"
},
{
"name":"comments",
"type":"redactor-field",
"label":"Comments:",
"dividerAfter":"<hr/>"
},
{
"name":"currency",
"isSelection":true,
"type":"select2",
"label":"Currency:",
"optionLabelPath":"code",
"content":"controller.CURRENCIES"
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment