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
#2

You cannot use the forms in a table, you need to redirect to the form then back to your table.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(07-05-2020, 03:30 AM)InsiteFX Wrote: You cannot use the forms in a table, you need to redirect to the form then back to your table.


Can't I insert submit and form buttons in the table?



How can you modify the data of a table?
Reply
#4

(This post was last modified: 07-05-2020, 08:10 AM by inumaru.)

Your closing tag is wrong maybe try to correct it.

you type
Code:
</frorm>

should be
Code:
</form>

and try to close all the form tag correctly, if the form is inside <td> it should be okay.
Reply
#5

(07-05-2020, 08:07 AM)inumaru Wrote: Your closing tag is wrong maybe try to correct it.

you type
Code:
</frorm>

should be
Code:
</form>

and try to close all the form tag correctly, if the form is inside <td> it should be okay.

I do not believe it....
The autocompletion of the ide ....
Thank you
Sorry for the distraction ....
Reply




Theme © iAndrew 2016 - Forum software by © MyBB