May be this is more a “How to” question then a PB question. For a hardcoded SAEF with 20 items I cannot use the integrated file upload form because I don’t want the normal users to access the CP. What I need is a way to upload images to an upload folder and populate the custom field (field_id_53 in this case) accordingly. I can get the path to the image to upload with an input form of type file. May be I overlook the obvious, but I get no idea how to proceed ...
<?php
$fields = array(
'field_id_32','field_id_38','field_id_39','field_id_40','field_id_42',
'field_id_43','field_id_44','field_id_45','field_id_46','field_id_47',
'field_id_48','field_id_49','field_id_50','field_id_51','field_id_52',
'field_id_53','field_id_54','field_id_55','field_id_56','field_id_57'
);
for($i = 0; $i < sizeof($fields); ++$i){
if(isset($_POST[$fields[$i]]))
$$fields[$i] = $_POST[$fields[$i]];
else $$fields[$i] = '';
}
?>
{exp:channel:entry_form channel="sires" return="sires" preview="sires/new"}
{preview}
{!-- preview fields --}
{/preview}
{!-- custom fields --}
<input type="file" name="???" value="???" /> {!-- how to proceed here for field_id_53 ??? --}
{/exp:channel:entry_formAny hint or help is appreciated!
EE 2.0.1 Build 20100121
Moved to HowTo by Moderator