Using elements of a Hash as radio Button - html

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>

Related

How to bind multiple events on a images in adaptive cards

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?

How to make a basic member system for a website

I want to make it so that people can log into an account that they've made using a signup form and I also want to make it so that when the account is created they it makes a profile page where they can edit their profile picture, banner, and bio.
I'm very new to well... everything so I need this explained in as much detail as possible.
The concept is simple, consider the following
1.It can be done if you have implement a login system. First you should have page for the user profile, like changing name, picture, etc....
2. Once they register you store the data in the db, with the user id (it can be auto increment column.
3. In you navigation have link for user page, once use click it show page you created for user profile.
4. When user login, store their user id in session, then based on their user id you can retrieve the information and show.
5. The entire page input elements has to be inside a form tag, so if user edit something and click on the update button (or any name you wish) it will update the values in the db.
Basically in the register you will have the insert coding for the user table, and in the user profile page you will have the update coding.
Hope you get the idea!!

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.

submitting multiple forms with one submit button

I have an application where in a signed in user searches a database and is displayed a table of results. These results are basically listings of events. I give the user then, the privilege to "keep" or "discard" any event (using radio buttons beside each event).
Now however, I wish to implement a functionality whereby, the user at the end can click just one "update" button and all changes are affected (since keeping one button for each record will be very user unfriendly). That is, I am looking equivalently to submit multiple forms with just one submit/update button.
Is this possible ?
You need to use javascript, I suggest you using JQuery. Using AJAX you need to submit each form - this way page will not be redirected once you submit a form!
Then, within each forms assign individual IDs for each form. Then, assign your submit button an id for example mySubmit. Up next, add following code:
$('#mySubmit').click(function(){
// submit form1 by ajax...
// submit form2 by ajax...
});
You may see jQuery's http://api.jquery.com/jQuery.post/ for further information on how to submit a form using ajax.
As long as all of the radio buttons and submit button are part of the same form, you don't need to worry about submitting multiple forms because there won't be any. You can have multiple submit buttons in a single form, you can give them different values to know which button was clicked.
If you don't want to use jQuery then use javascript to form a list of data separated by say ~ character and set this string to some hidden field and submit using document.formx.submit()
You will need to parse the string on server side to get the data in correct format.

Access 2007 VBA : Building a listbox with selection choices from another list box

So there are 8 categories that may be associated to each order, but not necessarily all of them. So i was going to build a list box that allowed the user to double click each of the category they wish to associate when they have an "Order Detail" form opened up (unbound form that has hidden text boxes with all needed ID numbers).
I want to have another empty text box right beside it that will allow me to append the selections (up to 8) so the user can see that they have been added.
So one list box with the default choices, and when a choice is double clicked, it adds that choice to the second list box to see the tally so to speak.
What is the VB for getting something like this done?
Thanks
Justin
I suggest that you are making life difficult for yourself. Create a subform with the Order Detail table and a combobox that allows the user to select the various categories.
If you want two list boxes --- one for available choices and another for selected items --- and the ability to move items back and forth between available and selected, it can be done with VBA, but is not trivial. See How do I select items using dual list boxes? for an example.
Personally I favor Remou's suggestion if you can make that work for your situation.