1

I'm using html <input> tag for creating a text box HTML page, I need to value of the apex field in that box. I've written the following line for it.

<input style="border:1px solid #007ACC;width:23px;height:25px;" disabled="true" type="text" name="name" value="{!CDOB_Day1}"/>

I can see the value in the vf page but when I do renderAs="pdf" the value in not appearing Please Help enter image description here

1 Answer 1

1

Hi Tabrez, values in input tags are not rendered in pdf. You can make one more tag to show data and render it only when renderAs="pdf". Here is a sample code:

/*****page*****/
<apex:page standardController="OBJECTNAME" extensions="CLASSNAME" renderAs="{!classVariable}">

<apex:outputPanel rendered="{!classVariable != "pdf"}">
    <input style="border:1px solid #007ACC;width:23px;height:25px;" disabled="true" type="text" name="name" value="{!CDOB_Day1}"/>
</apex:outputPanel>
<apex:outputPanel rendered="{!classVariable == "pdf"}">
    <p style="border:1px solid #007ACC;width:23px;height:25px;">{!CDOB_Day1}</p>
</apex:outputPanel>
</apex:page>

Its just a sample code design. You can modify it as per your requirement. Hope this may help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .