Hey everyone,
I’ve created some sites with ee , but never went too further.
This time, i’m trying to pre-set a form input value (actually, a File Field) with an existing file_id (previously selected) coming from the last url segment variable.
like this: index.php/myForm/15
Did try filling the value attribute with last_segment, but it keeps saying “The my_file_field field is required.”
{if segment_3 == ''}
{field:my_file_field}
{if:else}
<input type="file" name="my_file_field" data_directory="2" value="{segment_3}" /></p>
{/if}I guess this is not working because of the file input component, implemented differently by each browser.
So, how should I change my form in order to set my_file_field to a file_id reference for an existing file?
The ‘Show existing files’ option looks good but I need to filter the list. I can do some coding but don’t know where to look in ee.
Thanks in advance