[development] Creating submit and delete button with checkboxes in html format table

Gordon Heydon gordon at heydon.com.au
Wed Jan 5 04:54:33 UTC 2011


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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110105/39250b66/attachment.html 


More information about the development mailing list