We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

field type display_settings file upload field?

Development and Programming

imagineer's avatar
imagineer
8 posts
13 years ago
imagineer's avatar imagineer

For a website I am designing, I am developing a custom field that requires an image is displayed in the field when the content is entered. When the field is added to my custom fields group, I’d like the admin to be able to upload this image.

I know I can use

$file_field = $this->EE->file_field->field(
   $this->field_name,
   $data,
   $allowed_file_dirs,
   $content_type
  );

in the display_field() function inside my custom field. Is there a way it can be included in the display_settings() function?

Also, I’d like to inject some javascript on the entry page using:

$this->EE->cp->load_package_js('my_file');

However what directory do I place my javascript in?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.