I want to change the value of the submit button after the the form is submitted successfully without any validation errors.
And then when the page is reloaded the button's value will be changed to its original value?
$form_state array to set a js variable.
Edit: The form is submitted without ajax. The button should be replaced with that text after the form is submitted. And then when the user comes back to page again or reload it again then the text should be reverted.