How to create two onclick event button html? - html

I have created a form in html with two input feilds and one button.
List of Input Fields:-
Name
Mobile Number
Now what i wanted to do is if I click on a button, it should send an sms to mobile number entered.
clicking on the button should call an api(url) for which it should fetch the mobile number entered in the input field.

Related

refresh angular view changesDetectorRef.markForCheck

I am presenting a difficulty to update the view of a form.
in the onInit I define it and the objective is that after with the response of the API update the data of the form and the view, when clicking on the button that activates the toggleDetails function the form data is filled, the problem is that although the form data is updated the view no, even if you use the changesDetectorRef.markForCheck
enter image description here
enter image description here
The objective is that when you click on toggle the form is filled out with the data

MS Access: if I put a button on multiple rows form, can I detect on which row the button was clicked

Since the button is unbound to any record, can I detect on which row the button was clicked ?
Yes. Clicking the button sets focus to record row the button is on. So code that references fields of that record would pull values from that record. Form must be in Continuous view for button to display.

Split single form into multiple tabs with next/previous button in Yii2

I want to incorporate tabs in my form(it is dependent on multiple models) with next and previous button, and onclick of these buttons should validate the fields with comes only in their respective tabs but form should be submitted/saved to DB only at the end.
I have gone through my tabs example but they don't seem to have next and previous button in yii2.
Is there anyway to do this??

Displaying the your input at the next page

currently I had written a html page for a form submission. How do I go about bring all the inputs the user written on my submit button to another html page that display all the input.

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.