Jump to content

DawPi

Clients
  • Joined

  • Last visited

Posts posted by DawPi

  1. That app is merged into a Commerce app, an official app from the IPS do no worries.

    2 minutes ago, opentype said:

    Where do you see that?

    Invision Community’s payment app is called Commerce and it handles subscriptions and “product subscription“. None of them are going away. What is going away in Commerce is support tickets and physical products.

    I think he’s using the 3.x series, where the Subscription app was a standalone application.

    .

  2. Posted

    Hello,

    it's pretty simple to reproduce. The stack part:

    $form->add( new \IPS\Helpers\Form\Stack( 'myapp_authors', ! empty( $authors ) ? $authors : array(), TRUE, array( 'stackFieldType' => '\IPS\myapp\Form\File', 'maxItems' => 5, 'key' => array( 'placeholder' => \IPS\Member::loggedIn()->language()->addToStack( 'myapp_enter_name_placeholder' ), 'size' => 20 ), 'value' => array( 'min' => 0, 'max' => 100 ) ), NULL, NULL, NULL, 'myapp_authors' ) );

    And custom form field type constructor from myapp\(sources)Form\File:

    	/**
    	 * Constructor
    	 * Creates the two date objects
    	 *
    	 * @param	string		$name			Form helper name
    	 * @param	mixed		$defaultValue	Default value for the helper
    	 * @param	bool		$required		Helper is required (TRUE) or not (FALSE)
    	 * @param	array		$options		Options for the helper instance
    	 * @see		\IPS\Helpers\Form\Abstract::__construct
    	 * @return	void
    	 */
    	public function __construct( $name, $defaultValue=NULL, $required=FALSE, $options=array() )
    	{
    		$options = array_merge( $this->defaultOptions, $options );
    
    		parent::__construct( $name, $defaultValue, $required, $options );
    
            $this->keyField = new \IPS\Helpers\Form\Member( "{$name}[key]", isset( $defaultValue['key'] ) ? \IPS\Member::load( $defaultValue['key'] ) : NULL, TRUE, array(), NULL, NULL, NULL, "{$name}[key]" );
            
    		$this->valueField = new \IPS\Helpers\Form\Number( "{$name}[value]", isset( $defaultValue['value'] ) ? $defaultValue['value'] : NULL, FALSE, isset( $options['value'] ) ? $options['value'] : array() );
    	}

     

    And this is how it works and looks like:

     

    Is this a known issue or someone know how to fix it? 🤔

    Thanks in advance!

  3. 2 hours ago, teraßyte said:

    It seems the post I made earlier, right before this one, is throwing an error. 🤨

    [[Template forums/front/topics/postContainer is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

     

    Fixed -