Skip to content

Conversation

@staturecrane
Copy link
Contributor

This PR adds the Filestack field tag for to the FormHelpers. It can be used similarly to the v2 implementation, with a few differences:

  • New field injects a standard button, as well as an invisible text field to hold the value of the returned file (this is necessary because we do not have form support in the v3 Picker)
  • Instead of passing a general onchange callback, pass in a callback symbol in the options hash which defines which the function to be called. This function is expected to take a single argument, which represents the data returned from the Picker promise, and must either be the name of the function ('function', not 'function(data)') or a function wrapped in parentheses ('(function(data){console.log(data)})') that can be executed.
<%= f.filestack_field :filestack_url, 'button content', callback: 'callbackFunction' %>

@coveralls
Copy link

Coverage Status

Coverage increased (+6.3%) to 96.25% when pulling 0462bfc on feature/FS-1342-add-filestack-field-tag into 92be0c0 on develop.

@staturecrane staturecrane merged commit 6013a3d into develop Jul 20, 2017
@staturecrane staturecrane deleted the feature/FS-1342-add-filestack-field-tag branch July 20, 2017 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants