function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dmchengdmcheng 

VF: multiple input fields on same line?

Is there a way to put multiple input fields on the same line of a page?  E.g. LastName and Suffix__c on the same line.

 

Thanks

David

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

At least two :

 

  1. Create a two column pageblocksection and simply list the input fields inside it - this will create two input fields per row.
  2. Create a table with two columns and put each input field inside a separate column.

All Answers

bob_buzzardbob_buzzard

At least two :

 

  1. Create a two column pageblocksection and simply list the input fields inside it - this will create two input fields per row.
  2. Create a table with two columns and put each input field inside a separate column.
This was selected as the best answer
dmchengdmcheng
Thanks, that should do the trick.
avimeiravimeir

Bringing back an old issue, but is there a way to do it without tables nor pageblocksection?  

bob_buzzardbob_buzzard

If you aren't inside a table or a pageblock, you should just be able to list the input fields and the browser will lay them out on the same line.