Results 1 to 6 of 6

Thread: Field type -> File upload styling

  1. #1

    Default Field type -> File upload styling

    Hello,
    I've ran to a problem in form generator. I've made form with file upload field but I can't separate the input from "submit-Browse" button. I just want to put some margin on button so that it will be separated from input field, and also I can't style the input border...
    You can find the image of the problem here http://www.shrani.si/f/2d/A7/3Ut3Hy8o/upload.jpg.

    Please help :cry:
    Web design agency - EDsolution.si Izdelava spletnih strani

  2. #2
    User
    Join Date
    06-27-09.
    Location
    Ljusne, Sweden
    Posts
    59

    Default Re: Field type -> File upload styling

    Input fields of type file cannot be styled the same way as the other types...
    You can find a lot of information about this if you Google a bit. Here are a couple of links:
    http://www.quirksmode.org/dom/inputfile.html
    http://www.burhankhan.com/css_tricks/st ... ox-in-css/
    http://imar.spaanjaars.com/154/howto-st ... gt-control

  3. #3

    Default Re: Field type -> File upload styling

    I didn't know that type="file" in standard in HTML. Learning new things every day

    Thank you very much for quick and good help.
    Web design agency - EDsolution.si Izdelava spletnih strani

  4. #4

    Default Re: Field type -> File upload styling

    I've got one more question. Where is error ''output'' define? I want to display error bellow input not above, but I can't find it. I only found in form.php getError and some javascript getPosition but If I delete the whole sentence of js nothing happens.

    Thanks.
    Web design agency - EDsolution.si Izdelava spletnih strani

  5. #5
    User
    Join Date
    06-27-09.
    Location
    Ljusne, Sweden
    Posts
    59

    Default Switch order of form field and error message

    This involves some magic...
    Create a copy of your template "form_widget.tpl" (and other templates that you might need for your form) that you'll find under "system\modules\frontend\templates" and place the copies in the "templates" folder in your TL root.
    Or, use the "Templates" module in back end to edit them (which I prefer).

    Edit the template copies and locate this (in a couple of places, one for table oriented forms and one for non-table):
    Code:
    <?php echo $this->generateWithError(); ?>
    ...and change it to:
    Code:
    <?php echo $this->generateWithError(true); ?>
    Hey presto! It switches the error message and the form widget around!

  6. #6

    Default Re: Field type -> File upload styling

    Sorry for my late answer I didn't saw the replay. Thank you for this solution, it's little magic as you said
    Web design agency - EDsolution.si Izdelava spletnih strani

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •