Conditionally change the colour and text of a Form Button based on the value of another field

Hi 

I have a form used for both registering an entry in another system and closing an item in another system connected via Zapier. The button is the standard Blue Submit. I have a Multichoice field on the Record that is initially set to "Register" and then toggle to "Close" after the first submission.

On first submission, a multiple-choice field that is displays in the form as "Register". E.g

<div class="kn-input kn-read-only kn-input-multiple_choice control" id="kn-input-field_1390" data-input-id="field_1390">
<label for="field_1390" class="label kn-label"><span>Action</span></label>
Register
<p class="kn-instructions" style="display: none;"></p>
</div>

In this case, I would like the Submit button  

<button class="kn-button is-primary" type="submit">
Submit
</button>

to be renamed as "Register" and the button colour changed to Green.

On second Submission when the Action muli-choice field displays as "Close", I would like the button to be renamed as "Close" and changed to Red.

Would this be possible using javascript embedded in the knack application?