Jump to content
  • Status: Moved to Github

I'm not able to add a new field in the Downloads file form.

	public static ?string $class = 'IPS\downloads\File';

	public function formElements( ?BaseItem $item, ?Model $container ): array
	{
		return [
			'my_new_field' => new Text( 'my_new_field', $item ? $item->new_field : null, true )
		];
	}

The same works for topics:

	public static ?string $class = 'IPS\forums\Topic';

	public function formElements( ?BaseItem $item, ?Model $container ): array
	{
		return [
			'my_new_field' => new Text( 'my_new_field', $item ? $item->new_field : null, true )
		];
	}

It also worth mentioning that Downloads has a different signature method:

public static function formElements( ?Item $item=NULL, ?Model $container=NULL, string $bulkKey = '' ): array

Thank you.

User Feedback

Recommended Comments

There are no comments to display.