Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6245831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:34:43+00:00 2026-05-24T12:34:43+00:00

Different texts for edit and add form for Save button are specified using bSubmit.

  • 0

Different texts for edit and add form for Save button are specified using bSubmit.
If edit form is opened and closed, add form is opened and closed and edit form is opened again, edit form button caption becomes “Add row”.
How to fix this so that edit form save button text is “Save edits” always ?

I tried

bSubmit: function() { return "Save edits" },

put this prints function() … in button.

grid.navGrid("#grid_toppager", { refreshstate: 'current' }, 
          { url: 'Edit',
                editData: { _dokdata: FormData },
                savekey: [true, 13],
                closeOnEscape: true,
                bSubmit: "Save edits",
                reloadAfterSubmit: false
            },

       { url: 'Add',
           bSubmit: "Add row",
           editData: { _dokdata: FormData },
           savekey: [true, 13],
           recreateForm: true,
           closeOnEscape: true,
           clearAfterAdd: true,
           addedrow: 'last',
           reloadAfterSubmit: false,

           afterSubmit: function (response) { return [true, '', response.responseText] }
             }
       } );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:34:43+00:00Added an answer on May 24, 2026 at 12:34 pm

    You should use just use recreateForm: true property:

    myGrid.jqGrid('navGrid', '#pager',
        { add: true, edit: true, del: false, search: false },
        { bSubmit: "Submit Edit", recreateForm: true },  // Edit options
        { bSubmit: "Submit Add", recreateForm: true }    // Add options
    );
    

    See the demo.

    If you would search for recreateForm you will find how many time I wrote recommendation of use it. I posted even the suggestion to make the recreateForm:true and recreateFilter:true as default settings, but received no response. I can only repeat use the settings as your default settings and you will have less problems. If you use custom editing controls you have to use the setting in the most implementations of the custom editing (see here).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some standard-texts, but some portion of it is different. But of these
Using Python I want to be able to draw text at different angles using
I am current working on a project where, as different users add text to
How to save text file content to different arrays? my text file content is
I have a form that I want to be used to add entries. Once
I'm trying to single source a form page which can be in edit mode
this is my botton: <form> <input type=hidden id=id value='.$row['order_id'].'> <input type=button value=Delete onclick=ajaxFunction()> </form>
i have a rather difficult mapping problem. EDIT: reformulated descritpion for historical reasons texts
i've populated a dropdownlist control with different text properties but each text properties had
I need to read from a variety of different text files (I've some delimited

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.