Skip to main content
added 4 characters in body
Source Link
Mark J. Reeves
  • 2.7k
  • 13
  • 24

I think it's probably going to be a bit more complex than that. Assets may be doing that work with JavaScript rather than just routing a selected file to a field.

I would recommend opening up Firebug in Firefox or Developer Tools in Chrome or Safari, and instantiating a full-blown Assets field in your Safecracker template. You can then see:

  • The HTML it generates for the dynamic form field
  • The JavaScript references and any inline script it bundles into the form
  • What happens when you actually select a file and where that's stored until the form is submitted

You'll then have a sense of what you need to reproduce on your end to accomplish your goal.

I've never done this with Assets. We've done it with Matrix, where it's just a matter of adding sets of form fields with a new fieldfieldname convention. I suspect Assets is going to go a little deeper, though.

I think it's probably going to be a bit more complex than that. Assets may be doing that work with JavaScript rather than just routing a selected file to a field.

I would recommend opening up Firebug in Firefox or Developer Tools in Chrome or Safari, and instantiating a full-blown Assets field in your Safecracker template. You can then see:

  • The HTML it generates for the dynamic form field
  • The JavaScript references and any inline script it bundles into the form
  • What happens when you actually select a file and where that's stored until the form is submitted

You'll then have a sense of what you need to reproduce on your end to accomplish your goal.

I've never done this with Assets. We've done it with Matrix, where it's just a matter of adding sets of form fields with a new field convention. I suspect Assets is going to go a little deeper, though.

I think it's probably going to be a bit more complex than that. Assets may be doing that work with JavaScript rather than just routing a selected file to a field.

I would recommend opening up Firebug in Firefox or Developer Tools in Chrome or Safari, and instantiating a full-blown Assets field in your Safecracker template. You can then see:

  • The HTML it generates for the dynamic form field
  • The JavaScript references and any inline script it bundles into the form
  • What happens when you actually select a file and where that's stored until the form is submitted

You'll then have a sense of what you need to reproduce on your end to accomplish your goal.

I've never done this with Assets. We've done it with Matrix, where it's just a matter of adding sets of form fields with a new fieldname convention. I suspect Assets is going to go a little deeper, though.

Source Link
Mark J. Reeves
  • 2.7k
  • 13
  • 24

I think it's probably going to be a bit more complex than that. Assets may be doing that work with JavaScript rather than just routing a selected file to a field.

I would recommend opening up Firebug in Firefox or Developer Tools in Chrome or Safari, and instantiating a full-blown Assets field in your Safecracker template. You can then see:

  • The HTML it generates for the dynamic form field
  • The JavaScript references and any inline script it bundles into the form
  • What happens when you actually select a file and where that's stored until the form is submitted

You'll then have a sense of what you need to reproduce on your end to accomplish your goal.

I've never done this with Assets. We've done it with Matrix, where it's just a matter of adding sets of form fields with a new field convention. I suspect Assets is going to go a little deeper, though.