It would be nice if all the field properties were ...
# suitescript
m
It would be nice if all the field properties were accepted in
form.addField
, so that instead of having to do
Copy code
var field = form.addField({
  id: 'item',
  type: ui.FieldType.TEXT,
  label: 'Item',
 });
field.isMandatory = true;
field.defaultValue = 'Hello World';
field.updateDisplaySize({
    height : 60,
    width : 100,
});
you could do
Copy code
form.addField({
  id: 'item',
  type: ui.FieldType.TEXT,
  label: 'Item',
  isMandatory = true,
  defaultValue = 'Hello World',
  height : 60,
  width : 100,
});
👍🏻 1