refresh angular view changesDetectorRef.markForCheck - angularjs-directive

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

Related

I'm trying to making a button have to two actions. Send data to a Mailchimp and then send the user to another page

I have a form that when a customer fills it in, the data gets sent to Mailchimp when the button gets clicked. After this process id like the customer to get sent over to a thank you page to download a PDF document. Can a button have to actions like this?​
Yes. You just need to use e.PreventDefault() function, so it does not refresh the page until you complete all your tasks. Just add an EventListener to the button.
document.getElementById("myBtn").addEventListener("click", sentEmailsAndRedirect);
function sentEmailsAndRedirect(e){
e.preventDefault()
sendMailChimp():
donwloadPdf();
window.location.href = "http://www.page.com";
}

How to create two onclick event button 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.

The form data going to another page while action set to another page

I have a form in which the attribute action is set to go to a page but whenever i press the submit button its taking the data to another page.
while writing your form use post method if you are using get method or use get if using post. one of them uses to carry data while navigating to target.. so just change your form method..

flex:how to get input values on creation complete

I have a datagrid,2 textboxes & a button .In the third textbox i want to display the total of one of the column in datagrid. The data in grid is populated on button click, depending upon the values in textbox. but until I get values on creation complete,I am not getting the total.If i do calculateTotal() on button click M not gettting total.what can i
Flex is an event driven framework. Use events by the controls and the IList used as data provider to determine the state of te ui and the data itself. So you can easily get notifications when new data is available, when data changed etc.

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.