+ Start a Discussion
SF DakshendraSF Dakshendra 

if i enter a text in text box i need that text into a signature style box with different font styles how to design a visual page for that?

Hi

if i enter a text in text box i need that text into a signature style box with different font styles how to design a visual page for that?
Pankaj MehraPankaj Mehra
Hi Dakshendra,

You can use style attibute on <Apex:inputField> or <Apex:InputText> like <Apex:inputField style="font-style: italic;" value="{!Account.Name}">

Thanks
SF DakshendraSF Dakshendra
Hi thanks for your reply..
User-added image

In th above picture if i entered a name "Suresh" in a text box field automatically it takes signature type box like above image.
and also when i click on on button "different font style signature" it shows different styles for signature like below image.How can i get that requirement using visual page code.
User-added image
Pankaj MehraPankaj Mehra
Hi,

You need to remove the input field than and add a div instead where you can set background image, In input textbox you can update the css and set font style etc.
SF DakshendraSF Dakshendra
Hi 

Can you please send me the code ?

Thanks
Pankaj MehraPankaj Mehra
HI Dakshendra,

You need to have code like this in your VF page

Textfield snippet :
<apex:inputText value="{!Name}" onchange="updateDiv(this)">

<div id="signatureDiv"></div>

JS code:
function updateDiv(txt) {
// Set Div Value   
$('#signatureDiv').html($(txt).val());
//add signature style, add class
// clean up existing classes
$('#signatureDiv').classes = [];
// add class

$('#signatureDiv').addClass('StyleClass');


}

when you add css to div use below link for signature fonts
https://designshack.net/articles/css/the-10-best-script-and-handwritten-google-web-fonts/