Active
Project:
Prepopulate
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2013 at 18:41 UTC
Updated:
13 Jul 2016 at 11:00 UTC
Jump to comment: Most recent
Comments
Comment #1
eminencehealthcare commentedUse FileField source remote url and use the prepopulate module to fill it with the URL to the file.
Comment #2
juliencarnot commentedI'm using Drupal 8.1.1 and I was wondering if I could use Prepopulate to inject the local URL of a picture in the Image input of a form.
I tried to do this with the URL https://mysite.not/node/add/article?edit[edit-field-images-0-upload]=/ho... but wasn't successful. "edit-field-images-0-upload" is the id of the input field in the form, and /home/user/test-image.jpg is the local path (on my computer) to the image I'd like to prepopulate to my form. I tried including quotations marks around my local path too, with the same result.
Is there a way around this? I don't get what the "FileField source remote url" mentionned above would be. Any example would be greatly appreciated!
Comment #3
SeanA commentedI believe the suggestion is to use https://www.drupal.org/project/filefield_sources and configure the field to use a "Remote URL textfield".
Comment #4
juliencarnot commentedThanks a lot for the hint SeanA, that makes sense! Couldn't test it on Drupal 8 though, the filefield_sources dev branch is not working for me at the moment, but I'll check that out!
Comment #5
SeanA commentedSure, and I can confirm that it works on D7 at least.
Comment #6
Dandily commentedThank you SeanA! It's work fine for me for remote image:
&edit[field_img][und][0][filefield_remote][url]=But i don't know, how could i add any count of images with infinite field...
It's work only for generated fields, new one will not filled.
Does anybody know how to add any quantity of images?