⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

callback_edit_field on DateTime field



Ron
  • profile picture
  • Member

Posted 07 April 2014 - 12:39 PM

I would like to insert some text infront of my DateTime field. I tried the below, it works but I lost the nice datetime pop-up. Is is possible to keep the nice datetime pop-up with prefix? I tried type='DateTime', maybe not the right syntax?

 

 

$crud->callback_edit_field('Revised_PickUp_by_Carrier',array($this,'edit_field_callback_2'));

 

 

function edit_field_callback_2($value, $primary_key)
{
//add prefix for field
return 'Only if Scheduled Pick-Up has changed <input type="DateTime" value="'.$value.'" name="Revised_PickUp_by_Carrier">';
}


Amit Shah
  • profile picture
  • Member

Posted 09 April 2014 - 07:33 AM

Well first of all there is not input type with date time registered... what you probably will need to do is.. copy / paste the functionality from an existing gc form (add / edit) and then add the content to the same .. !! that should surely workout for you...

 

Or if you want, you can look out here - the library here is modified and so is the view to set a field tip. This is what you can extract, add to your library and view of GC and just use field_tip function to set tips for each field - the display currently is being shown up on right hand side.. you can adjust it your own way...

 

Happy GCing :)


Ron
  • profile picture
  • Member

Posted 17 April 2014 - 11:23 AM

Thank you. Sorry for late reply. I will try.