rendering radio instead of checkbox or select list in forms - atk4

I hav a form which has a model as a source:
$form->setModel("test");
In model, we can define the field type, for example: boolean will make the checkbox in form.
now how can we define the type which be rendered as Radio buttons?

Just specify type in your Model like so
$this->addField("name")->setValueList(array('1'=>1, '2'=>2))->type('radio');

Related

Template field in ext js

I have the need to create the custom form field which need to works like TemplateColumn in gridPanel.
This custom form field will render multiple field in data model using the provided template just like TemplateColumn.
Since i only want to display data using this custom form field in the form panel so i try to extend the display field, but it only accept 1 data field in the model.
How could I make the custom form field accept value from 2 or more data field in model.
Thanks in advance.
you can bind to several fields and also included text
bind: {
value: "{rec.field1} - static text -> {rec.field2}"
}
feel free to add a fiddle to show what you want to do if this is not correct.

how to add custom checkboxes in infusionsoft?

I am trying to add custom checkbox in Infusionsoft.
But in the contact form there is no any option to choose field type to checkbox:
This is not possible in infusionsoft. You cant create custome checkboxes.

smartgwt listgridfield with boolean type with checkbox in field header

I've listgridfield in which I need to show checkboxes. So, I just set that field like
listGridFieldChk.setFieldDataType(ListGridFieldType.BOOLEAN);
It working fine like I want, only thing which I need now is checkbox in header with the same field. So when user want to check or uncheck all checkbox at once will do with this.
I know about the listGrid property which put checkbox field at first column
thisGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
But this will not helpful for me, I need it at custom level.

How to make an extjs grid a form field?

I have a requirement to create a custom form field that is basically an extjs grid. The user should be able to click a result in the grid. This clicked result should then become the fields value. Also, this field needs to extend Ext.form.field. Here's what I got:
Ext.define('MyApp.field.Grid', {
alias: 'widget.GriedField',
extend: 'Ext.form.field.Base',
I'm a lot of confused on how to add a grid to form field base. Looks like form field base's template expects HTML. How do I get it accept a component?
If you just need to select a value from a list of items. Why not use a combobox?
If you need to select multiple items. There is an example of how to use the MultiSelect ux component in the documentation examples.
http://docs.sencha.com/ext-js/4-1/#!/example/multiselect/multiselect-demo.html
If you really must use a grid. Then I wouldn't bother with trying to create a field type and cause yourself grief.
Add a listener to your grids selectionchange event and update a hidden field in your form with the value you want from the grid. Job done.
I ended up putting the grid on a form indirectly through creation of dependencies on my model.
My model has master-detail, which the detail is just a store reference. I found that using associations did not work for me.
So, in adding a field to a form, I have something that manages changed events for the model (master record) and the detail stores.

Change ADF Query Panel's Default Component

In my JSPX page, I created a search page by drag-n-dropping the View Criteria (VC) to the page. By default the component's are text box. What I want to do is change some of them to use other components, such as the selectOneChoice component, with binding from another Entity Object (EO), or maybe add a date picker to it.
Is this possible? Or do I have to stick with the defaults?
This is all stuff that can be done in your view object under Attributes. For date attributes, make sure that the type is set to date. I've'nt done this one but for the selectOneChoice component, I'm assuming you can define a list of values on the desired attribute that is based on another view object. Also look in the Control Type field of the Control Hints when you edit an attribute. If you are using bind variable with your search I believe you can define these properties there also.

Resources