Hello,
In add and edit dialog forms when focus a field input, cursor wait beginning of text. How is it possible to put cursor at the end of field input text?
regards…
This could be the possible JS settings.
$grid["add_options"]["afterShowForm"] = 'function(formid) { jQuery("#"+formid + " > input:last").focus(); }';
$g->set_options($grid);
Well, this is just to give you an idea, you can have your JS code inside that function, to focus on last field.
Hi Abu,
I do not want to focus on last field input. I want to see cursor at the end of each field input text on focus if edit dialog form open . set cursor position like seltext+1(at the end of text) on focus each input if it is not null.
regards…
Hello,
I've provided you interface to play and put jquery implementation in functions body.
I'd suggest to look at stackoverflow to know the jquery code for our desired implementation.
Abu,
$grid["add_options"]["afterShowForm"] = 'function(formid) { jQuery("#detail").focus().select(); }';
$grid["edit_options"]["afterShowForm"] = 'function(formid) { jQuery("#detail").focus().select(); }';
this codes select text in field input which named as detail.
Why I ask my question to you firstly because If there is some prepared phpgrid function with related matter.Otherwise I spend a lot of time to solve by myself.
Yes, I must try to use jquery in phpgrid functions.
Thank you.