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

  • SEARCH
  • Home
  • 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 7738033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:09:26+00:00 2026-06-01T08:09:26+00:00

It is possible to group some fields in the edit form? I would like

  • 0

It is possible to group some fields in the edit form?

I would like to group some fields together, give them a summarizing name and give the group some different background color and maybe even border so the user can navigate more easily.

Suppose I have 4 entries in the colModel:

name
address
title
income

I would like to show it in the edit form like:

Personal:----------
| name     [    ] |
| address  [    ] |
-------------------
Business:----------
| title    [    ] |
| income   [    ] |
-------------------

where the fields belonging to the Personal group/category would have – let’s say – light green background and fields in the Business group would have light red background.

The difficulty is that there are lots of fields and I wouldn’t want to give them background color on a one-by-one basis.
And if there are groups then I could even use some collapse jQuery plugin to let the user to hide some of the groups.

Right now I’m struggling with custom_element creating some table around the group but no success yet.


Solution

As Tony pointed out on the jQuery Grid help forum:

Currently this feature is not available or at last adding such functionality requiere to use fsome events and knowledge of the structure of the edit form.

We plan in the next major release to introduce a templating in form editing.

So now there is no other solution like the one proposed by Oleg (thanks for the quick reply:).

I solved (partially) my task using his idea. Adding hrule containing table rows in the edit form, and finally styling the lines one-by-one.

The relevant parts:

$('<tr class="FormData"><td class="CaptionTD ui-widget-content" colspan="2"><hr/></td></tr>').insertBefore('#tr_********,');
$("#tr_*******,#tr_*******").css("background-color","#def");

Where the ******* are the column names from the colModel.

Adding borders and making it collapsible is way too much fuss this way, so that will be skipped for now.

  • 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-06-01T08:09:27+00:00Added an answer on June 1, 2026 at 8:09 am

    What you can do is almost free modifying of Add or Edit form inside of beforeShowForm callback. I demonstrate the idea on the demo which I quickly made for you. The example shows just an example of what you can do:

    enter image description here

    The corresponding code is

    $.extend($.jgrid.edit, {
        recreateForm: true,
        beforeShowForm: function($form) {
           $('<tr class="FormData"><td class="CaptionTD ui-widget-content" colspan="2">' +
               '<hr/><div style="padding:3px" class="ui-widget-header ui-corner-all">' +
               '<b>Invice information (all about money):</b></div></td></tr>')
               .insertBefore('#tr_amount');
           $('<tr class="FormData"><td class="CaptionTD ui-widget-content" colspan="2">' +
               '<hr/><div style="padding:3px" class="ui-widget-header ui-corner-all">' +
               '<b>Delivery information:</b></div></td></tr>')
               .insertBefore('#tr_closed');
        }
    });
    

    I set $.jgrid.edit only to change beforeShowForm for both “Add” in “Edit” forms. The 'amount' and 'closed' used in .insertBefore('#tr_amount')) and insertBefore('#tr_closed') are the column names from the colModel.

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

Sidebar

Related Questions

I'm trying to come up with the largest possible group of friends that would
I have a dataset containing some variable1 and a quarterly datefield. I would like
I've seen some possible approaches (in some database engines some of them are synonyms):
I'd like to construct a single query (or as few as possible) to group
What I have is a table that has different fields and among them the
It is possible to group,filter or exclude some of the push notifications receivers? Or
I wonder whether it is possible to force nginx to use some user/group for
Possible Duplicate: Retrieving the last record in each group I have two tables set
is possible do a case in a group by? similar to this: select *
Is it possible to perform a named-group match in Perl's regex syntax as with

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.