I have a field "text" where users will right stuff, i wanted to ask if there is a way when viewing the field to see all the description not only part of it....
Question
- Single Page
Posted 18 June 2013 - 09:24 AM
Posted 19 June 2013 - 06:18 AM
Second question - how can i remove the (dd/mm/yyyy) after the date ?
Posted 19 June 2013 - 07:04 AM
3 question - I want to use uppercase for add and edit on some fields. i have found :
$crud->callback_add_field('xxxx',array($this,'callback_to_upper_xxxx'));
function callback_to_upper_xxxx()
{
return '<input type="text" name="xxxx" style="text-transform:uppercase;">';
}
but this don't work, anyone know how can i do it ?
Posted 19 June 2013 - 23:54 PM
Second question - how can i remove the (dd/mm/yyyy) after the date ?
If you want to make that everywhere you can change the template
Posted 19 June 2013 - 23:59 PM
I have a field "text" where users will right stuff, i wanted to ask if there is a way when viewing the field to see all the description not only part of it....
if you mean a column you can use callback_column to show full text for that.
Or you can try to search your solution on this forum.
Posted 20 June 2013 - 07:25 AM
If you want to make that everywhere you can change the template
I see but from what file i have look for it on add/edit/view/template and still i cant find it.
Posted 25 June 2013 - 05:55 AM
anyone was some info how can i solve my problems ?
1. I need to add into a colum with uppercase all the user type in the form
2. i need to remove the (dd/mm/yyyy) when adding a date on a form.
EDIT : i have find $this->ui_date_format = "$ui_day/$ui_month/$ui_year"; in the GC librarie and after i remove it i only get () any one know how can i remove them ?
thanks for your time.
Posted 25 June 2013 - 07:35 AM
Maybe for 1 you need to make changes to your-theme-add(edit).css (and/or .js) for permanent changes.
If it is a specific column use the field id. Otherwise try to parse it via jQuery.
Now for 2 this is a hack that is not suggested but anyway...
Under application/libraries go to grocery_crud.php and find this
protected function get_datetime_input($field_info,$value)
there you will find this line,
Just remove the ({$this->ui_date_format}) part.
But the best way is to extend the GC library and override the get_datetime_input function with your own code.
Posted 25 June 2013 - 07:51 AM
davidoster thanks for your replay, I think i need to explain better the modifications i want to make for the first problem. i have a form with fields like First Name, Last Name and so on. In that form users add informations and rest. I have used callback function and style="text-transform:uppercase to change the view of the users but the informations added to the table are still in lowcase. I need to change what they input to uppercase and then added to the table. any hints ?
Posted 25 June 2013 - 20:44 PM
For the first, except what I suggested about using jQuery to transform also use callback_before_insert to get the $post_array and transform the values to whatever you want, before comitting to the database.
Posted 26 June 2013 - 06:06 AM
Davidoster can you help me a bit when you have the time with the code i have look over callback_before_insert but i can figure it how to make it :( , and for the secound problem i did exacly what you told me but i still see the (dd/mm/yyyy), the only way to remove them so far is to remove $this->ui_date_format = "$ui_day/$ui_month/$ui_year"; but then i still get the () without the text. I have look over template but i dont seam to find from where exacly are they added.
again thanks for your time.
Posted 26 June 2013 - 13:43 PM
And i have one more question how can i make the select case of a dropdown menu bigger, to be the same of the with the rest. I have look over CSS but can find it ..
Posted 27 June 2013 - 05:44 AM
Fix my first problem .. the ({$this->ui_date_format}) hade to be deleted from 2 places. if someone needs it to jest do a search for it and delete it.
I still need some help with the uppercase insert problem and how to make the dropdown's bigger.