Remove the "... OR upload an image"

edited November 2011 in Modules
Hi,

I just want one upload input not the two its currently showing hes what i have put then it shows 2 browsed for PDF input and i only require 1

$fields['product_installation_pdf'] = array('label' => 'Upload Installation PDF', 'type' => 'file', 'upload_path' =>assets_server_path('products', 'pdf'), 'overwrite' => TRUE);

Comments

  • edited November 2011
    see the image on imageshack i just want the first browse upload box not the second one so how do i get rid of that?

    URL to image: http://imageshack.us/photo/my-images/153/screenshot20111110at205.png/

    So need to remove the ...OR upload part, can you explain how I do such thing?
  • edited 11:47AM
    if you do a print_r($fields); it should give you all the fields. Then to remove it, you can do:
    unset($fields['my_field']);

    The ... OR upload comes from the fuel/modules/fuel/models/base_module_model.php form_fields method (which is what the models are inheriting from). It looks for a field ending with _img or _image, and then adds that (see line 444 in that file).
  • edited 11:47AM
    Ok thanks but i cant remove the line on 444, nor can i get print_r to show, am i doing something worng?
  • edited 11:47AM
    The reference to line 444 was just so you know where that field is coming from. You should be able to place the following in your model's form_fields() method:
    echo '<pre>'; print_r($fields); echo '</pre>';
Sign In or Register to comment.