By rulespl on
Hi
I need to create a field that will consist of two elements:
- standard file upload input
- select list with destination paths.
The file would be saved in localisation according to selected option
for examle:
private://file_type_1/
where "file_type_1" comes from the selection list.
Is it possible to achieve this by create new widget for file field?
Or do I have to create from scratch a new field type with widget using not managed_file type but regular file type?
Comments
Thank You for Sharing
Hi,
I would read this carefully http://drupal.org/node/644164.
Afterwards, please edit your post and move it to the "Post Installtion" forum. That's where folks can discuss existing Drupal functionality (and it's configuration).
The forum you've posted in, is for developers who have analyzed Drupal's existing functionality and compared that functionality to their specific requirements. If the result of that comparison is, the required functionality does not exist, then folks begin to program a Drupal "module" (functional extension). When folks have specific questions regarding use of the Drupal API, they post their questions here.
You'll get the best answers but posting in the correct forum :)
Hope that helps.
Thank you for sharing
Actually in this case I think
Actually in this case I think he is asking about coding.
Contact me to contract me for D7 -> D10/11 migrations.
This is definitely code
This is definitely code question.
I'll try to explain it again:
In File module standard widget form for File Field is generated by managed_file type (file.field.inc):
I notice attribute '#upload_location' . I'm not sure but that mean file path must be specified when the widget form elements definition and can't by change later due to the drop-down selection.
My question is:
Can I override this widget form and add select list element with specyfic paths?
Or build new field type and use standard file type element not managed_file for widget?