Welcome Guest, Not a member yet? Register   Sign In
Prevent forms starting new line?
#1

[eluser]umbongo[/eluser]
I have two forms which i want to be on one line. These point to different controllers so i have two instances of form_open() and form_close(). This currently is forcing at least two line breaks. How can i avoid this??

Also is it possible to submit a form with a plaintext link instead of a button??
#2

[eluser]dudeami0[/eluser]
For a plain text link you have to use javascript (Since this is not the intended use of a link). Also, mind showing an example of the form from the view? Would help with seeing the problem.
#3

[eluser]pickupman[/eluser]
This shouldn't matter what the form helpers are doing. Take a look at your CSS rules to make them be on the same line.
#4

[eluser]umbongo[/eluser]
Ok.. how is that done? I haven't touched CSS yet. There is no way to do it otherwise?

@dudeami0; theres really not much to it, but the relevant parts are essentially;
Code:
<?php
echo form_open('/a/b').form_hidden('from',uri_string()).form_submit('do','Do').form_close();
echo ' | '.form_open('/page/go').form_input('q','').form_submit('go', 'Go').form_close().' other stuff..';?>
#5

[eluser]dudeami0[/eluser]
Oh, I wasn't thinking visual (I thought you meant the form had random new lines showing up). You could add "display: inline" with CSS to the form.
#6

[eluser]pickupman[/eluser]
[quote author="dudeami0" date="1288942739"]Oh, I wasn't thinking visual (I thought you meant the form had random new lines showing up). You could add "display: inline" with CSS to the form.[/quote]
That's exactly right, by default a [url="http://w3schools.com/tags/tag_form.asp"]<form>[/url] tag is a block level element as explained by the html 4.01 specification




Theme © iAndrew 2016 - Forum software by © MyBB