Adriano Faria Posted October 29, 2018 Posted October 29, 2018 My app adds a field in registration screen ( \IPS\core\modules\front\system\register\buildRegistrationForm() ) $form->add( new \IPS\Helpers\Form\Text( 'invite_code_req', NULL, TRUE, array( 'maxLength' => 32 ) ), 'password_confirm' ); It should appear AFTER the Confirm Password field. But it doesn't: So I installed a plugin that I've made a quite while ago and it works fine IF my app is disabled: If I enable my app, then: I already removed and made my hook from the scratch but it's enough my app to be enabled and the positions aren't respected. Where else, apart from the hook file itself, can I check to see what is happening there? Asking because I also tested it without the plugin in the registration screen (I removed the hook) and keeps not working the birhday plugin. EDIT: and it's not a cache (local) issue because it happens in clients boards. Tks.
bfarber Posted October 30, 2018 Posted October 30, 2018 My hunch is you'll need to add some debug code in \IPS\Helpers\Form::add() to figure out why it's not respecting the $after parameter properly.
Adriano Faria Posted October 30, 2018 Author Posted October 30, 2018 4 hours ago, bfarber said: \IPS\Helpers\Form::add() Oh God! I hate when I make such mistakes! 🤬 I also have a hook in \IPS\Helpers\Form::add() to add my field in the social media registration screen and take a look at the error: class invite_hook_is_SocialMediaForm extends _HOOK_CLASS_ { public function add( $input, $after=NULL, $tab=NULL ) { $form = parent::add( $input, $after=NULL, $tab ); The right is: $form = parent::add( $input, $after, $tab ); Forgot to remove the default value for the $after parameter. Then:   Tks, @bfarber.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.