Body: <p>I am trying to create a custom module where I have created an asset uploader field. Images are getting uploaded with that field but not saved.</p>
  <pre><code>class Settings extends Model
  {
     // Public Properties
      // =========================================================================
      public $imageId = [];
  
  
      // Returns the validation rules for attributes.
      public function rules()
      {
          return [
              [['imageId'], 'required'],
  
             
          ];
      }
  
      public function getimages()
      {
          return Craft::parseEnv(trim(Ig::getInstance()-&gt;getSettings()-&gt;imageId));
  
          }
      
  }
  
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-16T13:25:29.217Z
Comments.Text: Please post your code and the specific error that you're experiencing. Impossible to help you with so little information.
Comments.UserDisplayName: MoritzLost
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-16T13:56:16.890Z
Comments.Text: I have added my code as well now for more clarification the last function get images is not working for saving.
Comments.UserDisplayName: Eira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-01T06:53:30.513Z
Comments.Text: Have you checked?
Comments.UserDisplayName: Eira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-01T08:36:39.963Z
Comments.Text: If you want people to help with a complex problem, you have to put a little effort into explaining it. The code you posted is meaningless without context. Where and how is this Settings model used? How are you calling it, what are you expecting to see, what are you actually seeing? What have you tried to solve it? What are specific errors/issues you're stuck on? Right now the question looks like a 'do my homework for me' request, which nobody likes to answer.
Comments.UserDisplayName: MoritzLost
Tags: <plugin-development><assets><image><modules>
Title: How to save the selected assets in custom module
ThreadText: # How to save the selected assets in custom module
  
  (Asked by: username_0 on 2022-02-16)
  
  I am trying to create a custom module where I have created an asset uploader field. Images are getting uploaded with that field but not saved.
  
  ```
  class Settings extends Model
  {
     // Public Properties
      // =========================================================================
      public $imageId = [];
  
      // Returns the validation rules for attributes.
      public function rules()
      {
          return [
              [['imageId'], 'required'],
  
             
          ];
      }
  
      public function getimages()
      {
          return Craft::parseEnv(trim(Ig::getInstance()->getSettings()->imageId));
  
          }
      
  }
  
  ```
  
  **Tags:** plugin-development, assets, image, modules
  
  > **Comments:**
  > **username_1**: Please post your code and the specific error that you're experiencing. Impossible to help you with so little information.  
  > **username_0**: I have added my code as well now for more clarification the last function get images is not working for saving.  
  > **username_0**: Have you checked?  
  > **username_1**: If you want people to help with a complex problem, you have to put a little effort into explaining it. The code you posted is meaningless without context. Where and how is this Settings model used? How are you calling it, what are you expecting to see, what are you actually seeing? What have you tried to solve it? What are specific errors/issues you're stuck on? Right now the question looks like a 'do my homework for me' request, which nobody likes to answer.  
  
  ---
  
  ## 0 answers
  
  