Inline editing
Inline editing
bobhassanster
Posts: 16Questions: 5Answers: 1
in Editor
Link to test case: http://docs.ensaf.ac.ma/test/test.php
Description of problem: In inline editing the input text is working but The select input is not working and it's working in normal edit. Many Thanks for your Help.
Editor php:
Editor::inst( $db, 'testTable', array('year', 'nature', 'user'))
->fields(
Field::inst( 'testTable.user')
->options( Options::inst()
->table( 'user' )
->value( 'user_id' )
->label( array('first_name', 'last_name') )
->render( function ( $row ) {
return strtoupper($row['first_name'].' '.$row['last_name']);
} )
)
->validator( Validate::dbValues() ),
Field::inst( 'user.first_name' )
->set(false),
Field::inst( 'user.last_name' )
->set(false),
Field::inst( 'testTable.note' )
->setFormatter( Format::ifEmpty( null ) ),
)
->leftJoin( 'user', 'user.user_id', '=', 'testTable.user' )
->process( $_POST )
->json();
Replies
Editor Script:
I realized that it's not working just for the first column if i change the position it works, do you know why?
Your selector to trigger inline editing is
tbody td:not(:first-child)
. So it is explicitly excluding the first cell in each row (i.e. the first column).Just use
tbody td
if you want to be able to click on all cells in the table to trigger inline editing.Allan
Thanks!