One of our developers reported that it seems that this application “deletes” people’s reaction images 😞
$return = parent::form( $form );
try
{
$reaction = \IPS\membersshop\Reactions::load( $this->id, 'reaction_id' );
}
catch( \Exception $e )
{
$reaction = FALSE;
}
$form->add( new \IPS\Helpers\Form\Number( 'reaction_shop_points', $reaction ? $reaction->points : 0, TRUE, array( 'min' => 0 ) ) );
if ( $values = $form->values() )
{
try
{
$reaction = \IPS\membersshop\Reactions::load( $this->id, 'reaction_id' );
}
catch( \Exception $e )
{
$reaction = new \IPS\membersshop\Reactions;
}
$reaction->points = $values['reaction_shop_points'];
$reaction->reaction_id = $this->id;
$reaction->save();
}
this is the form() method, so here it calls $form->values() but then the regular form handling is going to do the same, i think that's where the problem is occurring