Jump to content
  • Status: Moved to Github

I can't use the toggle in my form to hide the icon field because it's missing the ID in the RADIO field in the relevant method:

It should be:

	public function iconFormFields( Form &$form ) : void
	{
		$prefix = static::iconFormPrefix();
		$form->add( new Radio( $prefix . 'icon_choose', $this->icon_type, null, [
			'options' => [
				'none' => $prefix . 'icon_choose_icon_none',
				'icon' => $prefix . 'icon_choose_icon',
				'upload' => $prefix . 'icon_choose_upload'
			],
			'toggles' => [
				'icon' => [ $prefix . 'icon_picker' ], 'upload' => [ $prefix . 'icon_upload' ] ]
		], NULL, NULL, NULL, $prefix . 'icon_choose' ) );

instead of

	public function iconFormFields( Form &$form ) : void
	{
		$prefix = static::iconFormPrefix();
		$form->add( new Radio( $prefix . 'icon_choose', $this->icon_type, null, [
			'options' => [
				'none' => $prefix . 'icon_choose_icon_none',
				'icon' => $prefix . 'icon_choose_icon',
				'upload' => $prefix . 'icon_choose_upload'
			],
			'toggles' => [
				'icon' => [ $prefix . 'icon_picker' ], 'upload' => [ $prefix . 'icon_upload' ] ]
		] ) );

Thank you.

User Feedback

Recommended Comments

Esther E.

Invision Community Team