Creating submit and delete button with checkboxes in html format table
Hi, I have fetched values from database and shown in html format table with the code help fromDrupal Community in my module file something like belowin figure 1. Now I have to create a check box infront of every row for deleting and editing that row values. Above or below the html table I have to create 3 Buttons "NEW","DELETE","EDIT" as shown in figure 2. "NEW" button should redirect me to form module where I have fields for filling form values. Using check boxes I have to delete or edit the data. How I can add buttons ,checkboxes and do my work.Please give me code .I am new to drupal so need help of Community. *Figure 1:* <http://localhost/fr/rss.xml> Slno Code Description Type Group 1 ABC Something bla bla one a 2 XYZ Some one one c *Figure 2:* <http://localhost/fr/rss.xml> SlnoProduct CodeProduct DescriptionUomProduct TypeProduct GroupPlant code 1P001Turmeric Root PowderKgRMBO0012P002Birds Eye Chilly WholeKgRMBO0013P003Brahmi WholeKgRMBO0014P004Long Pepper WholeKgRMBO0015P005Mace WholeKgRMBO0016P006Neem Leaf WholeKgRMBO0017P007Patchouli Leaf wholeKgRMBO0018P008Lemon Grass OilKg RMBO0019P009Neem OilKgRMBO001 *MAHESH GAJABAR Software Developer FrontalRain Technologies,Bengaluru*
Hi, What version of Drupal are you using? If you are using Drupal 7, then it is about 10 lines of code which is demonstrated in the examples module http://drupal.org/project/examples. However if you are using Drupal 6, then it is considerable harder and I would recommend taking a look at the AJAX stuff in ctools. Gordon. On 05/01/2011, at 3:50 PM, mahesh gajabar wrote:
Hi,
I have fetched values from database and shown in html format table with the code help fromDrupal Community in my module file something like belowin figure 1. Now I have to create a check box infront of every row for deleting and editing that row values. Above or below the html table I have to create 3 Buttons "NEW","DELETE","EDIT" as shown in figure 2.
"NEW" button should redirect me to form module where I have fields for filling form values. Using check boxes I have to delete or edit the data. How I can add buttons ,checkboxes and do my work.Please give me code .I am new to drupal so need help of Community.
Figure 1:
Slno Code Description Type Group 1 ABC Something bla bla one a 2 XYZ Some one one c
Figure 2:
Slno Product Code Product Description Uom Product Type Product Group Plant code 1 P001 Turmeric Root Powder Kg RM BO 001 2 P002 Birds Eye Chilly Whole Kg RM BO 001 3 P003 Brahmi Whole Kg RM BO 001 4 P004 Long Pepper Whole Kg RM BO 001 5 P005 Mace Whole Kg RM BO 001 6 P006 Neem Leaf Whole Kg RM BO 001 7 P007 Patchouli Leaf whole Kg RM BO 001 8 P008 Lemon Grass Oil Kg RM BO 001 9 P009 Neem Oil Kg RM BO 001
MAHESH GAJABAR Software Developer FrontalRain Technologies,Bengaluru
On 05/gen/2011, at 05:54, Gordon Heydon <gordon@heydon.com.au> wrote:
Hi,
What version of Drupal are you using?
If you are using Drupal 7, then it is about 10 lines of code which is demonstrated in the examples module http://drupal.org/project/examples.
However if you are using Drupal 6, then it is considerable harder and I would recommend taking a look at the AJAX stuff in ctools.
Hello, Ajax ? Why ? P.
Please pardon me if this sounds harsh, but there should be hundreds of examples in your Drupal site already. Perhaps you could look at them first? Or maybe http://drupal.org/node/751826? Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr. ________________________________ From: mahesh gajabar <mahesh143an@gmail.com> To: development@drupal.org Sent: Tue, January 4, 2011 11:50:55 PM Subject: [development] Creating submit and delete button with checkboxes in html format table Hi, I have fetched values from database and shown in html format table with the code help fromDrupal Community in my module file something like belowin figure 1. Now I have to create a check box infront of every row for deleting and editing that row values. Above or below the html table I have to create 3 Buttons "NEW","DELETE","EDIT" as shown in figure 2. "NEW" button should redirect me to form module where I have fields for filling form values. Using check boxes I have to delete or edit the data. How I can add buttons ,checkboxes and do my work.Please give me code .I am new to drupal so need help of Community. Figure 1: Slno Code Description Type Group 1 ABC Something bla bla one a 2 XYZ Some one one c Figure 2: Slno Product Code Product Description Uom Product Type Product Group Plant code 1 P001 Turmeric Root Powder Kg RM BO 001 2 P002 Birds Eye Chilly Whole Kg RM BO 001 3 P003 Brahmi Whole Kg RM BO 001 4 P004 Long Pepper Whole Kg RM BO 001 5 P005 Mace Whole Kg RM BO 001 6 P006 Neem Leaf Whole Kg RM BO 001 7 P007 Patchouli Leaf whole Kg RM BO 001 8 P008 Lemon Grass Oil Kg RM BO 001 9 P009 Neem Oil Kg RM BO 001 MAHESH GAJABAR Software Developer FrontalRain Technologies,Bengaluru
Are you looking for custom code? Because, from the explanation of what you're trying to do, Views should accomplish this take. I believe you can configure each row to have CRUD actions and multi-select options are available too. http://drupal.org/project/views Todd On 4 January 2011 23:50, mahesh gajabar <mahesh143an@gmail.com> wrote:
Hi,
I have fetched values from database and shown in html format table with the code help fromDrupal Community in my module file something like belowin figure 1. Now I have to create a check box infront of every row for deleting and editing that row values. Above or below the html table I have to create 3 Buttons "NEW","DELETE","EDIT" as shown in figure 2.
"NEW" button should redirect me to form module where I have fields for filling form values. Using check boxes I have to delete or edit the data. How I can add buttons ,checkboxes and do my work.Please give me code .I am new to drupal so need help of Community.
*Figure 1:* <http://localhost/fr/rss.xml> Slno Code Description Type Group 1 ABC Something bla bla one a 2 XYZ Some one one c
*Figure 2:* <http://localhost/fr/rss.xml>
Slno Product CodeProduct Description UomProduct Type Product GroupPlant code1 P001Turmeric Root PowderKgRMBO 0012P002Birds Eye Chilly WholeKg RMBO 0013P003Brahmi Whole KgRMBO0014 P004Long Pepper WholeKgRMBO 0015P005Mace WholeKg RMBO0016P006Neem Leaf Whole KgRMBO0017 P007Patchouli Leaf wholeKg RMBO 0018P008Lemon Grass OilKg RMBO0019P009Neem Oil KgRMBO001
*MAHESH GAJABAR Software Developer FrontalRain Technologies,Bengaluru*
Also see http://drupal.org/project/views_bulk_operations On Wed, Jan 5, 2011 at 5:39 AM, Todd <todd@savagevenus.net> wrote:
Are you looking for custom code? Because, from the explanation of what you're trying to do, Views should accomplish this take. I believe you can configure each row to have CRUD actions and multi-select options are available too.
http://drupal.org/project/views
Todd
On 4 January 2011 23:50, mahesh gajabar <mahesh143an@gmail.com> wrote:
Hi,
I have fetched values from database and shown in html format table with the code help fromDrupal Community in my module file something like belowin figure 1. Now I have to create a check box infront of every row for deleting and editing that row values. Above or below the html table I have to create 3 Buttons "NEW","DELETE","EDIT" as shown in figure 2.
"NEW" button should redirect me to form module where I have fields for filling form values. Using check boxes I have to delete or edit the data. How I can add buttons ,checkboxes and do my work.Please give me code .I am new to drupal so need help of Community.
*Figure 1:* <http://localhost/fr/rss.xml> Slno Code Description Type Group 1 ABC Something bla bla one a 2 XYZ Some one one c
*Figure 2:* <http://localhost/fr/rss.xml>
Slno Product CodeProduct Description UomProduct Type Product GroupPlant code1 P001Turmeric Root PowderKgRMBO 0012P002Birds Eye Chilly WholeKg RM BO0013P003Brahmi Whole KgRMBO0014 P004Long Pepper WholeKgRMBO 0015P005Mace WholeKg RMBO0016P006Neem Leaf Whole KgRMBO0017 P007Patchouli Leaf wholeKg RMBO 0018P008Lemon Grass OilKg RMBO0019P009Neem Oil KgRMBO001
*MAHESH GAJABAR Software Developer FrontalRain Technologies,Bengaluru*
participants (6)
-
Carl Wiedemann -
Gordon Heydon -
mahesh gajabar -
nan wich -
Paolo Mainardi -
Todd