How to use imagecrop with managed_file field?

Comments

ianthomas_uk’s picture

Category: Feature request » Support request

Can you be more specific with your question?

imagecrop (dev version until RC4) supports the Media 7.x-2.x module, which uses file_entity. Did you want the crop button to show somewhere else, or for non-media files?

ianthomas_uk’s picture

Status: Active » Postponed (maintainer needs more info)
anacona16’s picture

Sorry.

I want use javascript crop module in a field managed_file with form API https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7#managed_file

ianthomas_uk’s picture

Status: Postponed (maintainer needs more info) » Active
anacona16’s picture

Sorry.

I want use javascript crop module in a field managed_file with form API https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7#managed_file

Suppose that I have a form programmed with the form API:

$form['image_fid']= array(
        '#type' => 'managed_file',
        '#default_value' => $item->fid,
        '#required' => TRUE,
        '#upload_location' => 'public://images/',
        '#upload_validators' => array(
          'file_validate_extensions' => array('png jpg jpeg'),
        ),
);

Once upload the image I want use the javascript module.

mcrittenden’s picture

Hey @anacona16, did you end up finding a solution for this?

nicrodgers’s picture

+1

anacona16’s picture

Hey @mcrittenden, no.