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
ExploreForceExploreForce 

<apex:inputText> and <apex:commandButton>. How to display them on single line??

<apex:pageBlock ><apex:pageblockSection ><apex:pageBlockSectionItem >
                     <apex:inputText styleClass="form-control" id="email" value="{!email}" style="width:400px"/>
                     <!--<apex:inputText styleClass="input-medium" id="email" value="{!email}"/>-->
                     <apex:commandButton value="Confirm" styleClass="btn-primary" action="{!UpdateCart}" style="background:orange"/>
                     <!-- <input type="email" class="form-control" id="exampleInputEmail1"> </input>-->
                     </apex:pageBlockSectionItem></apex:pageblockSection></apex:pageBlock>

 I want a textbox and commandbutton on same line. How to achive this without using <apex:pageblock>?
Please help!!
 
ExploreForceExploreForce
 User-added image
SfdcprogrammerSfdcprogrammer
<apex:page standardController="contact">
<apex:form >

                     <apex:inputText styleClass="form-control" id="email" value="{!contact.email}" style="width:400px"/>
                     <!--<apex:inputText styleClass="input-medium" id="email" value="{!email}"/>-->
                     <apex:commandButton value="Confirm" styleClass="btn-primary" action="{!}" style="background:orange"/>
                     <!-- <input type="email" class="form-control" id="exampleInputEmail1"> </input>-->
               
                     </apex:form>
</apex:page>

User-added image

The main theme of pageblock and page blocksection is to show in an ordered way. If u don't want to use it, it will look like this


Vatsal KothariVatsal Kothari
Hi,
you can refer below code:
<apex:pageBlock >
	<apex:pageblockSection >
		<apex:pageBlockSectionItem >
			<apex:form >
				<apex:inputText styleClass="form-control" id="email" value="{!email}" style="width:400px"/>
				<apex:commandButton value="Confirm" styleClass="btn-primary" action="{!UpdateCart}" style="background:orange"/>
			</apex:form>
		</apex:pageBlockSectionItem>
	</apex:pageblockSection>
</apex:pageBlock>
If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal