[closed] Image Formtool & Auto generation not respecting passed in stPropMetadata

Hi All,
I’ve just noticed some strange behavior with the image form tool when you pass it a new width or height.
If I have an edit.cfm that passes stPropMetadata.imgSlide.ftImageWidth = 1200 into a ft:object the auto generation still creates an image based on the the original metadata for that property.
Also, when you go to regenerate the image using the cropper, it works but displays some incorrect info… see pic below.

<cfscript>stPropMetadata = {};stPropMetadata.imgSlide.ftImageWidth = 1200;</cfscript><ft:object objectid="#stObj.objectid#" typename="wbMySlides" stPropMetadata="#stPropMetadata#"/>

Looks like the formtool is ignoring the passed in metadata and just looking at the cached metadata defined on the component. Image formtool is a complex beast :wink: Might be an easy fix for someone who knows their way around in there – possibly a job for @blair or @justincarter

Which tag/branch/commit is your core currently on?

The image formtool is much more complicated than the others, including ajax
requests to upload and process images. To fully support dynamically setting
every image setting, we would have to store all of it in the form, send it
all in every ajax request, and probably submit it in the form too. My
feeling is that all of that is far too much overhead to add to every image
property. What is the use case for dynamically specifying an image size?


Whoops sorry 7.1.2.
This is for a plugin I have for creating a Revolution Slider with captions. To date I just use the hard coded values for the slide sizes but I’d like it to be more dynamic and at least be able to set the sizes in a config and perhaps later, user defined.
The cropper does seems to respect the passed new width value when cropping, so there must be some variable aware of the new meta data.

This is pretty low on the priority so don’t bust a gut. I thought I’d try it out this morning and was surprised that the formtool didn’t respect the passed values. I did have a poke around and realised it was a bit of a monster of a formtool so decided just to put it out there than go any further.


Sounds nice :smile:

You could allow customisation of the default config by having users extend the plugin Slider Image with their own cfproperty settings… its not as nice as having it configured through the webtop but then again they are going to have to make code changes in the project to install the plugin in any event.