Creating radio button with text field in install4j - install4j

I want to create a form component that contains radio button along with text field for each of the radio button options. The radio button group component in install4j creates a radio button, however there is no option to create a text field along with it. Basically, I want to give an option to the user to allow him to enter either of the 2 values. Is there any other alternative? The value will be entered by the user and hence cannot use combo box. Please help!

You can use a "Single radio button" form component and "Text field" form component and put them into a "Horizontal group".
In the configuration of the "Single radio button" form component, select the "Coupled form component" tabs and select the text field form component. Then the text field will only be enabled is the radio button is selected.
Then, repeat this for each value of the radio button group and make sure that all "Single radio button" form components have the same value in their "Variable name" properties.

Related

How to populate an elementor form field inside of an elementor popup based off of a button ID on the same page

I'm basically emulating an ecommerce style of page, whereby when a user clicks a button "Get Quote" an elementor form popup opens with some basic fields, including a product "SKU" field.
So on the page I have a few products, with some of their details etc. then below each product I have "Get Quote" button. When I click this button I want the popup to open and the SKU field's of the form's default value set to the Button ID of the product button that was clicked...
Not sure if this makes sense, or if it's possible.

popuating country and state dropdown in cq form element dropdown(not dialog)

I am using cq form and have a dropdowns dragged and dropped on the form for country and states.
How do i make states available on change of country.(I am populating country options from a item load path i.e. a node has all countries as its children).
I searched a lot all I am getting is how to do it in dialog box.but thats not what I am looking for.
I want to populate the /libs/foundation/components/form/dropdown component.
Any help is welcome.
I am using cq 5.6.1 (aem 6 adaptive forms has some way to do it)
Here's how you can do it
Add the FORM component to the page
Add Dropdown List component in between the above Form Start/End
Right-click on the dropdown component, select Edit. In the dialog, enter the Element Name(Country), Title, and in "Items Load Path" enter the node path from where data need to be filled in.
Add another Dropdown List component
Right-click on the dropdown component, select Edit. In the dialog, enter the Element Name (State), Title, and in "Items Load Path" enter the node path from where data need to be filled in. Save to come back to dialog.
In the dialog, choose Show/Hide, a dialog popups up. Choose Country "is equal to" some value "say US". This value should match the values in the above Country dropdown. Save and exit.
That's it.

Which checkboxes are selected in MATLAB GUI?

When I want to know which radio buttons are selected in a panel in a MATLAB GUI, I use this line:
ChosenOption = get(handles.OptionPanel, 'SelectedObject');
where OptionPanel is the Tag of the panel where the radio buttons are located.
However, if I want to use checkboxes instead of radio buttons, is there any way to do the same?
Thank you.
You would typically get the Value property of each checkbox to determine whether it was checked or not.
Note that typically with checkboxes any, all, or none of the checkboxes may be selected (in contrast to radio buttons, where typically only a single radio button would be selected at any one time), so you would want to get the Value property of each checkbox separately. There's no equivalent of a uibuttongroup that you would use with radio buttons (although you can of course graphically group the checkboxes in a uipanel).

Liferay Autofield with DatePicker

I have a aui form with Liferay.Autofields enabled.
The fields that I am duplicating with Autofield has a button and a textfield. The button click will trigger the datepicker and the selected value should be stored in the textfield.
And, when I click the "PLUS" button provided by Autofield, the fields are duplicated.
First, I need to know how I can bind the trigger event of all buttons to the datepicker. I know to do this for a single button. But since we are using autofield, I need to give the ID of the button with the index. Can anyone suggest how to bind the trigger event in my scenario
Second, once I click the date picker button, I should be able to get index of the Autofield row in which I have clicked, so that I can update my textfield

"Create New" text box in GWT radio button group

In my GWT app I have a radio button group of choices. The last choice is to add a new item. What I want is that the words "create new xyz" to disappear, and to be replaced with a text box to take the input. What is the best way to do this? I have thought about using a disclosure panel, but that seems unnatural and I don't have it working properly yet.
Is it possible to write an onClickHandler for that radio button? If so, then inside that onClickHandler, add code to generate the textbox.