Results 1 to 2 of 2

Thread: How do I get a form element to display in a lightbox?

  1. #1
    Join Date
    Apr 2013
    Schaumburg, IL, U.S.A

    How do I get a form element to display in a lightbox?

    I'm currently using Drupal 7 and I'm using the Form API to generate the form. What I'd like is for certain fields to be represented by a link, which when clicked on, opens the field in some kind of lightbox. This is what I tried, but it doesn't seem to work:

    '#prefix' => "<a href=\"/screen #snvisdt_note_div\" rel=\"lightmodal\" title=\"Add Note\" >note\</a> <div id=\"snvisdt_note_div\" style=\"display:none;\">",
    '#type' => 'textarea',
    '#title' => 'Add More Information',
    '#suffix' => "</div>",

    "screen" is the name of the page the form is on. I am trying to do this in Lightbox 2, but would be happy to use some other solution, if it works. Can someone please give me an example of what would work?

  2. #2
    Join Date
    Mar 2013
    Iasi, Romania
    as far as i know, lightbox can only be used for images...try using fancybox instead

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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