Sry, thought I got that in there, I already have added those. The
widget shows up on the edit page, just without any content in it. i.e.
it's always at 00:00
GameForm.class.php
protected $minutes = array('00','05',10,15,20,25,30,35,40,45,50,55);
public function configure()
{
Solved.
The issue was that I had not overridden the toArray method in my
object to provide my virtual column. When I added this to
Game.class.php, everything worked:
public function toArray($deep = true, $prefixKey = false)
{
$arr = parent::toArray($deep, $prefixKey);
$a
I copied the _form.php template out of the cache, and added
var_dump($form['end_time']->getValue());
which yields:
NULL
the other fields print correctly:
var_dump($form['end_ts']->getValue());
prints
string(19) "2008-12-05 01:00:00"
which leads me to think that the issue h
Rather, that does die when the form is submitted.
On Oct 23, 9:31 am, ashton wrote:
> That will die when the form is submitted. Unfortunately, that's not
> the issue that I'm having, what I'm seeing is that when going to the
> edit page initially, getEndTime never gets called, and my end_time
>
That will die when the form is submitted. Unfortunately, that's not
the issue that I'm having, what I'm seeing is that when going to the
edit page initially, getEndTime never gets called, and my end_time
widget doesn't get any values. Before I submit the form, just loading
the page.
On Oct 23,
Try adding an updateEndTimeColumn method in your form :
class GameForm extends ...
{
// ..
public function updateEndTimeColumn($value)
{
die("yes !");
$this->getObject()->setEndTime($value);
}
}
Alexandre
2009/10/23 ashton
>
> I have already added those. The widget shows
I have already added those. The widget shows up on the edit page,
just without any content in it. i.e. it's always at 00:00
thought I had that info on there, sry.
GameForm.class.php
protected $minutes = array('00','05',
10,15,20,25,30,35,40,45,50,55);
public function configure()
{
You should add widget/validator to your form.
2009/10/22 ashton
>
> Hi,
> I'm trying to add a method ('endTime') that doesn't exist in the
> model, it's essentially a convenience method to set just the time part
> of time_ts which is a timestamp. It shows up properly in the list,
> however, t