Jump to content

Field position in the form. What can cause this 'error'?


Adriano Faria

Recommended Posts

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:

w9yDoFi.png

So I installed a plugin that I've made a quite while ago and it works fine IF my app is disabled:

lBKIDOD.png

If I enable my app, then:

aX6SKWj.png

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.

Link to comment
Share on other sites

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:

bWOvNx5.png

 

J9HJcra.png

 

Tks, @bfarber.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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