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
ThomasTTThomasTT 

How to display a text next to apex:inputField with required=true without line break?

I'd like to display a input field (with apex:inputField) for unit price and a text for the currency Iso Code and I want to display them in 1 line (e.g. ______  USD, not ______ <br/> USD).

And the input field has required='true' attribute... this is the problem, but anyway, I tried the following 2 ways:

<apex:pageblockSectionItem>
<apex:outputLabel value="Unit Price"/>
<apex:outputPanel>
<apex:inputField id="price" value="{!oppLineItem..UnitPrice}" required="true"/>
{!opportunity.currencyIsoCode}
</apex:outputPanel>
</apex:pageblockSectionItem>

<apex:pageblockSectionItem>
<apex:outputLabel value="Unit Price"/>
<apex:outputPanel>
<apex:inputField id="price" value="{!oppLineItem..UnitPrice}" required="true">
{!opportunity.currencyIsoCode}
</apex:inputField>
</apex:outputPanel>
</apex:pageblockSectionItem>

 and both ended up with the following HTML.

<div class="requiredInput">
<div class="requiredBlock"/>
<input id="price" type="text" name="price"/>
</div>
USD

How can I make it in 1 line like the following HTML

<div class="requiredInput">
<div class="requiredBlock"/>
<input id="price" type="text" name="price"/> USD
</div>

 or is there any other way to make them in 1 line? maybe it's just HTML/CSS issue, but any help is appreciated.

Thank you in advance.

ThomasTT

 

Message Edited by ThomasTT on 09-28-2009 11:07 AM
Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler
Check this post out and see if it helps.

All Answers

jwetzlerjwetzler
Check this post out and see if it helps.
This was selected as the best answer
ThomasTTThomasTT

Thank you! Some of users are still using IE6, so I'll discuss with the client. Putting the currency in the label is another solution, so I'll take either of them.

 

Thanks again!

 

ThoamsTT