How can I post data from custom html form (before login form) into a form in a process.
Confluence User - 02 Jul, 2025
I'm trying to make an independent signup page in my app.
// SIGN UP AJAX
$('#signup-button').on('click', function () {
const variables = {
full_name: $('#reg-full_name').val(),
username: $('#reg-username').val(),
email_address: $('#reg-email').val(),
password: $('#reg-password').val(),
confirm_password: $('#reg-confirm_password').val(),
phone_number: $('#reg-phone_number').val(),
role: $('input[name="reg-role"]:checked').val(),
Approval: $('#reg-approval').val(),
status: 'Pending'
};
const formattedVariables = Object.entries(variables).map(([key, value]) => ({
name: key,
value: value
}));
const processDefId = 'it_helpdesk_ticketing%2333%23user_sign_up'; // Update if version changes
$.ajax({
url: `https://joanneeee.on.joget.cloud/jw/web/json/workflow/process/start/${processDefId}`,
method: 'POST',
contentType: 'application/json',
data: JSON.stringify({ variables: formattedVariables }),
success: function () {
alert('Registration submitted! Please wait for approval.');
$('#signup-box').hide();
$('#login-box').show();
},
error: function (xhr) {
console.error("Signup failed:", xhr.responseText);
alert('Signup failed: ' + xhr.responseText);
}
});
});
This is the code I used in before login form for the sign up part, but i can't get data from the ajax post request into my process.
forms;json;ajax;userviews