6

I am trying to create a content type (say Meter). Each Meter consists of a "Meter Reading". This meter reading content contains three fields, say title, date range and usage. I have a Panel page where I display all the Meter Readings related to a parent Meter. I have displayed the Meter Readings in a tabular format.

I want the user to be able to add new Meter Readings without going to the default Meter Readings creation page. Rather than the default form kind of page, the user should be able to enter the data in the table view provided and it should be automatically saved into the project itself.

So, I want the functionality to be like:-

  1. Display all the meter readings with two links, i.e., Edit and Delete,
  2. When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline in the same table,
  3. In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be added dynamically to the table and the user should be able to make a new entry into it.

Is there a module in Drupal 7 for doing so?? I have already tried out several modules for this such as SlickGrid, jQGrid and jEditable.

Any help would be great. Thanks in advance.

9
  • you can try the solution in this link. drupal.stackexchange.com/questions/58052/… Commented Feb 1, 2013 at 7:36
  • @MohammedShameem Tried this out... Not the solution for me... I need to do it inside the table and fields collection is not the way for me... Commented Feb 1, 2013 at 7:39
  • have you tried drupal.org/project/editablefields Commented Feb 1, 2013 at 7:40
  • @MohammedShameem Yes I did... but editablefields distorts the view badly because I am using date api and every field then comes with a textbox and save button, which totally distorts the table layout... I even tried it out with a grid but even that is not helping... Commented Feb 1, 2013 at 7:42
  • you could use css to manage the display. a bit of javascript to remove the buttons and instead add the funtion of the button on the on click of the item itself. Commented Feb 1, 2013 at 7:44

2 Answers 2

1

I think Editable Fields module should do the trick for you. It lets you edit the fields in both node and views. Checkout the project page image for more details.

Regarding the delete option you may need to do some tweaking. Adding a 'add new meter reading' should not be very difficult. Just get the nodes value from the context and generate the add link.

enter image description here

0

Trust me :) use this modules: field_collection , field_collection_views use field_collection_views formatter for your field_collection field. This would automatically create the add edit and delete links to those who have permission to do so both in views as well as node view.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.