How to bind multiple events on a images in adaptive cards - json

I am trying to achieve following scenarios through adaptive cards. I have tried many ways but still not able to reach any far by my expectation.
Scenario one
I am trying to build a feedback rating card which has 3 images. As soon as a user clicks on any of the image, I would like both Action.ToggleVisibility and Action.Submit event to trigger at the same time. Is it possible to bind two events on a image in adaptive cards?
Scenario two
Since the first option did not work for me, I tried to add the radio buttons along with the existing images and a Submit button separately. But this time, It was found that the radio button does not have an option to associate an image with it. Also, the alignment of the choice set cannot be changed from vertical to horizontal. Is there any workaround for this?

Related

Jump to specific field when a multiple choice radio button is selected in Gravity Forms

is there an option or maybe a small custom code to make Gravity Forms radio buttons jump to a field on selection?
In my example, i have a list of 14 options. Using a condition logic when you select one option a custom HTML is revealed right under each and every option. For desktop is super ok, the screen is big and all fit well. The problem is for mobile devices because you select an option but after that, you have to scroll to see the custom HTML.
Is there any option or custom code snippet in Gravity Forms that jumps to that custom HTML when an option is selected?
I found some resources on how to make this using HTML code with ids but this is somehow dynamic though the HTML code is placed in the same position. My first idea was to add the same ID to each and every HTML code so that when a radio button is pressed it scrolls to that ID. Don't know if it makes sense but ...
Can someone help me with some resources or give me some hints? Many thanks.

Using elements of a Hash as radio Button

I have an application in which a user can create a sport, also any user can register to the sport by selecting it. I'm trying to use radio buttons as i intend for any user to be able to select more than one, but i'm having issues with radio_button_tag and collection_radio_button . collection_radio_button only shows one option and both still needs a label. I want to be able to pass the sports created in the view (using radio button) as a hash so that it can be dynamically increased or reduced as the sports are created by users. Also please is there another option that's workable and not necessarily radio buttons.
Here,the scenario should allow user to add multiple sports.so you should use checkboxes and the code is
<label>Cricket<input type="checkbox"/></label>

Best usabilty with an editable data grid and other form fields on same page

I am creating a page and the page has an editable data grid (I'm actually using jqgrid). The user can add, delete, and edit the rows of the grid. There are also some other form fields on this page such as text boxes and drop downs, but they are not part of the grid.
From a usability perspective which of the options do you think is best and why?
User manages the grid separately from the rest of the page. This means that there is a save button on the grid. So the user can save a grid row to the db without clicking the submit button. When the submit button gets clicked, the non-grid form fields get sent to the server.
user manages grid and other fields dependent upon each other. This is like an "Everything or nothing scenario." When you click the submit button, all of the form fields get submitted an saved the db along with the grid fields. If there is a validation error, nothing gets saved.
If there is a better way to handle this type of situation that I did not list, please let me know.
What I was thinking when I was in a similar situation, is how important it's that the user fills the other form fields. If they are optional and the grid is more important I would have the submit button in the grid but if I want the user to fill all the fields, the button should be at the end. In the case where the button saves the whole form, you can have a type of warning if the user skips some fields or you can have a deactivated button.
The second thing I thought was the height of the page. If the button hides 'above the fold' there is a high posibility that some users won't see it and the data won't be saved. So in that case, maybe you should have it in the grid. I would check analytics about screen resolutions.

filteringSelect with multichecked

is there any ready widget like that?
If not, can I combine the dijit filteringSelect with dojox multichecked?
if not, is it easy to create one of my own or has any one started doing this? it's so necessary for my project.
There is no widget like that as far as I know (the multichecked widget itself is not even a standard widget, since it's a part from DojoX).
About your question of combining both. I don't think that will be easy, because the dijit/form/FilteringSelect does not use a <select> as widget and I don't think they're made to be ran together.
And the answer to your last question: it all depends on what functionality you exactly need. A dijit/form/FilteringSelect only allows you to select 1 value (it's a textbox with a dropdown in fact, and a textbox can only have 1 value).
If you want to create a variant with radio buttons, then that is possible, but it is not an easy job. The multichecked is working with a simple DOM node, however, the dijit/form/FilteringSelect offers a lot more things like autocomplete, stores, ... . To make your widget work, you need to listen to all these events and adapt yuur radio buttons to it.
I made a simple example that is only displaying radio buttons for each item in the filtering select, the code can be seen at JSFiddle. However, it does not react to changes, that's a part that you will have to implement.

A DataGrid with Text, Images and Buttons

I want to realise a Chat, where the people can send messages. Each message can contain one button where the other poeple can click at. Maybe I also want to display a avatar beside each message. I was looking for a build in component like List or DataGrid, but I didn't find the opportunity to add buttons or images.
It should also be possible to resize the chat and to scroll through the messages.
What do you think? Which is the best approach to realize this?
Your going to need to be a little more specific...What technologies are you using other than your tagged stuff ?
To add images/buttons to a List or DataGrid, you will need to create a custom ItemRenderer (for List) or GridColumnItemRenderer (for Grid). You can read about this here and here