Hello,
I've got a drupal 4.7.3 site, and I've got a page where I'm inserting html for a form. For this form, I'd like the radio buttons to display inline. No matter what I do, drupal forces them to display as block. Also, hidden elements show up as empty space, so it looks goofy. Here's my form:
http://beta.menashalibrary.org/catalog
I have a static template on my computer I used to test the form. It points to the stylesheets used on the site, and everything displays fine. But, once I paste the form code into drupal, it messes up the formatting. It does the same thing if I create a block.
Any ideas what may be causing this to happen?
Here's the html: <div id="searchbox"> <script language="JavaScript"><!-- function copyAndSubmit(from,to) { to.myText.value = from.myText.value; to.submit(); }
document.write(' <form name="search_footer" action="http://webcat.winnefox.org/web2/tramp2.exe/do_keyword_search/gue st" method="get" enctype="application/x-www-form-urlencoded">'); document.write('<p><input type="hidden" name="myText">'); document.write(' <input type="hidden" name="SETTING_KEY" value="Menasha" />'); document.write(' <input type="hidden" name="index" value="default" />'); document.write(' <input type="hidden" name="hitlist_screen" value="hitlist.html" />'); document.write(' <input type="hidden" name="record_screen" value="Record.html" />'); document.write(' <input type="hidden" name="query_screen" value="home.html" />'); document.write(' <input type="hidden" name="servers" value="1home" />'); document.write(' <label for="keyword"><input name="index" type="radio" value="au" id="keyword" checked />Keyword</label>');
//--></script>
<form name="search_footer" action="http://webcat.winnefox.org/web2/tramp2.exe/do_authority_search/g uest" method="get" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="SETTING_KEY" value="Menasha" /> <input type="hidden" name="location_group_filter" value="all" /> <input type="hidden" name="servers" value="1home" /> <label for="author"><input name="index" type="radio" value="au" id="author" />Author</label> <label for="title"><input name="index" type="radio" value="ti" id="title" />Title</label> <label for="subject"><input name="index" type="radio" value="su" id="subject" />Subject</label></p> <input type="text" name="query" value="" /> <input type="image" src="http://www.greenlakelibrary.org/fileadmin/images/search.gif" value="" style="vertical-align:bottom;" alt="search catalog" width="58" height="18" vspace="1" border="0" /> </form> </div>
And, here's the css: #searchbox { color: #000; background-color: transparent; width: 520px; margin: 20px 0 50px 15px; padding: 0; font-size: .9em; } #searchbox p { line-height: 1.5em; } #searchbox form { margin: 20px 20px; padding: 10px; border: thin dashed #ccc; }
Thank you so much for any help you can give me on this!
- jody
On Sunday 15 October 2006 06:16, Jody Cleveland wrote:
Hello,
I've got a drupal 4.7.3 site, and I've got a page where I'm inserting html for a form. For this form, I'd like the radio buttons to display inline. No matter what I do, drupal forces them to display as block. Also, hidden elements show up as empty space, so it looks goofy. Here's my form:
You're not doing this in a module, are you?
I'm not sure about the hidden fields, but for the radios, try using the CSS in this node (spcifically the "float: left;", "display: inline;" and "clear: left;" parts):
Hello,
You're not doing this in a module, are you?
No, I just created a new page, and am using the input format of full html.
I'm not sure about the hidden fields, but for the radios, try using the CSS in this node (spcifically the "float: left;", "display: inline;" and "clear: left;" parts):
I added those properties to the stylesheet for that div and form, but it didn't have any effect.
Since this is just one form, do I need to modify form.inc?
- jody
Hello again,
You're not doing this in a module, are you?
I'm not sure about the hidden fields, but for the radios, try using the CSS in this node (spcifically the "float: left;", "display: inline;" and "clear: left;" parts):
I think I figured out the problem...
For some reason, having the input format set to full html, drupal's still treating each carriage return as a line break. Is there a way to turn that off when the input format is set to full html?
- jody