Welcome Guest, Not a member yet? Register   Sign In
Table Custom
#1

I would like to create a dynamic table with the edit and delete buttons.

PHP Code:
        $this->table->setheading(   'Product',
                                    'Description',
                                    'Number',
                                    'Actions'
                                    );

        foreach ($param as $key_TB => $value) {
    
    //second Buttons Delete
            $LAY_BT_Delete '<form action="FormDelete" method="POST">
                                    <input type="text" hidden name="id" value="'
.$value["id"].'">
                                    <button class="btn btn-danger" type="submit">
                                        Delete
                                    </button>
                                    </frorm>'
;
    
    // Close first button Change FormChange
            $LAY_BT_Change ='<button class="btn btn-primary" type="submit" >
                                                Change
                                            </button>
                                            </frorm>'
;
    
    //Data for form change                                        
            $this->table->addRow(   '<form action="FormChange" method="POST">'
                                    .'<input type="text"  class="form-control" maxlength="50" required name="name" value="'.$value["name"].'">'
                                    '<input type="text" class="form-control" maxlength="50" name="description" value="'.$value["description"].'">',
                                    $Number,
                                    $LAY_BT_Change.$LAY_BT_Delete);

        }
        return  $this->table->generate(); 
When he sees the first form open he closes it.
But without understanding the data to be sent.
And it doesn't allow me to generate the second submission form.

what solution can i use?

Thanks
Reply


Messages In This Thread
Table Custom - by gra - 07-04-2020, 10:56 AM
RE: Table Custom - by InsiteFX - 07-05-2020, 03:30 AM
RE: Table Custom - by gra - 07-05-2020, 04:25 AM
RE: Table Custom - by inumaru - 07-05-2020, 08:07 AM
RE: Table Custom - by gra - 07-05-2020, 09:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB