# How to make submit button perform two actions, save and edit

**URL:** <https://www.ruby-forum.com/t/how-to-make-submit-button-perform-two-actions-save-and-edit/125693>\
**Category:** Rails\
**Created:** [January 11, 2008, 6:57am UTC](https://www.ruby-forum.com/t/how-to-make-submit-button-perform-two-actions-save-and-edit/125693 "2008-01-11T06:57:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fries88](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6bbea6/32.png) [@fries88](https://www.ruby-forum.com/u/fries88)\
**Post date:** [January 11, 2008, 6:57am UTC](https://www.ruby-forum.com/t/how-to-make-submit-button-perform-two-actions-save-and-edit/125693/1 "2008-01-11T06:57:53Z")

</div>

Hi,  
I am trying to create a form where the first time a user access it saves  
the fields. Then the subsequent time the user accesss the form it edits.
