I’m using the colorbox jquery plugin and I’d like to display a PHP form in the colorbox.
<?php if( is_array($pages_created) ){ ?>
<form id="link_page_form" method="post" action="my_url" >
<select id="page_from_link" name="page_from_id" >
<OPTION VALUE="" >Associate with:</OPTION>
<?php foreach($pages_created as $k) { ?>
<OPTION id="<?php echo $k[3] ?>" VALUE="<?php echo $k[0]; ?>" ><?php echo $k[1]; ?></OPTION>
<?php } ?>
</select>
<button type="submit" >OK</button>
</form>
<?php } ?>
What should I do to make that possible ?
( $(“#link_page_form”).colorbox(); doesn’t work )
Can you try doing something like:
$(document).ready(function() { $("#some_anchor_id").colorbox({inline:true, href:"#link_page_form"}); });Hope it helps