cakePHP readonly field size -
i have following bit of code
echo $this->form->input('users.failure', array ("label" => 'reason failed', 'id'=> 'reasonautopop','size' => '100', 'readonly'=>'readonly'));
the field auto-populated via javascript. has kept read-only per customer specification, in conditions. longest failure reason 100 characters. can display 27 characters only. there different way set width/size readonly fields?
my tip: use hidden read-only field, , mimic input field - designed needs <p>
or <pre>
.
edit
echo $this->form->input('users.failure', array ("label" => 'reason failed', 'id'=> 'reasonautopop','size' => '100', 'readonly'=>'readonly', 'type'=>'hidden')); // since it's hidden, shouldnt care size. // now, add css designed element. echo "<p class='looks_like_an_input_field'>$value_of_users.failure_element</p>";
is clearer?
Comments
Post a Comment