Jump to content

Bug: Form Text and 0 Values


TDBF
Go to solution Solved by Marc,

Recommended Posts

I have just upgraded my test and live installs from Version 4.7.12 to Version 4.7.14, and I have issues with Form Text not displaying 0 values correctly. 0 seem to be treated as NULL or Empty values now.

Text Form on 4.7.12

Could contain: Page, Text

Same Form 4.7.14

Could contain: Page, Text, Electronics, Mobile Phone, Phone

There were no other changes to the code or the values (database) expect from changing from Invision 4.7.12 to 4.7.14.

$form->add( new \IPS\Helpers\Form\Text( 'fixture_goals_home', $fixture->goals_home, FALSE, [], NULL, NULL, NULL, 'fixture_home_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Text( 'fixture_goals_away', $fixture->goals_away, FALSE, [], NULL, NULL, NULL, 'fixture_away_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Text( 'fixture_home_ft_score', $fixture->home_ft_score, FALSE, [], NULL, NULL, NULL, 'fixture_home_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Text( 'fixture_away_ft_score', $fixture->away_ft_score, FALSE, [], NULL, NULL, NULL, 'fixture_away_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Text( 'fixture_home_ht_score', $fixture->home_ht_score, FALSE, [], NULL, NULL, NULL, 'fixture_home_ht_score' ) );
$form->add( new \IPS\Helpers\Form\Text( 'fixture_away_ht_score', $fixture->away_ht_score, FALSE, [], NULL, NULL, NULL, 'fixture_away_ht_score' ) );

If I change the above to use Form Number instead

$form->add( new \IPS\Helpers\Form\Number( 'fixture_goals_home', $fixture->goals_home, FALSE, [], NULL, NULL, NULL, 'fixture_home_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Number( 'fixture_goals_away', $fixture->goals_away, FALSE, [], NULL, NULL, NULL, 'fixture_away_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Number( 'fixture_home_ft_score', $fixture->home_ft_score, FALSE, [], NULL, NULL, NULL, 'fixture_home_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Number( 'fixture_away_ft_score', $fixture->away_ft_score, FALSE, [], NULL, NULL, NULL, 'fixture_away_ft_score' ) );
$form->add( new \IPS\Helpers\Form\Number( 'fixture_home_ht_score', $fixture->home_ht_score, FALSE, [], NULL, NULL, NULL, 'fixture_home_ht_score' ) );
$form->add( new \IPS\Helpers\Form\Number( 'fixture_away_ht_score', $fixture->away_ht_score, FALSE, [], NULL, NULL, NULL, 'fixture_away_ht_score' ) );

Then the form values are correct.

Could contain: Page, Text, Electronics, Mobile Phone, Phone

 

Link to comment
Share on other sites

  • 2 months later...
On 11/6/2023 at 2:28 PM, Marc Stridgen said:

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

Can you let me know if this bug has been fixed in the next release?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...