I need to submit the form below (components/com_users/views/login/tmpl/default_login.php. ) using Ajax.
<form action="<?php echo JRoute::_('index.php?option=com_users&task=user.login'); ?>" method="post">
<fieldset>
<?php foreach ($this->form->getFieldset('credentials') as $field): ?>
<?php if (!$field->hidden): ?>
<div class="login-fields"><?php echo $field->label; ?>
<?php echo $field->input; ?></div>
<?php endif; ?>
<?php endforeach; ?>
......
</form>
My Ajax request will come from external mobile App (on click, I run javaScript with Ajax to submit the form).
Is that possible? If yes, what parameters should I pass to the Ajax request (based on the example here : "Form submit with AJAX passing form data to PHP without page refresh" I need to pass url, data and success).
If that is possible, I'm also able to pass username and password (which the form fetch them from fieldset), I can provide them in plain text (no security concerns about that).