This topic is locked

How do I change font (size/style) of data in Edit Page?

8/26/2007 2:06:22 PM
PHPRunner General questions
G
gr8hands author

No matter what I do, I am unable to change the size or style of the font of the data which is returned on the Edit Page.
It looks fine in PHPRunner 4.0 (build 265), but when the actual web page loads, the data is in 8 or 10 point in a font I don't want. My web page will be used by senior citizens, so I need the printing to be LARGE.
I've gone into the HTML and tried:

<FONT face="Times New Roman" size=4> and <FONT style="FONT-SIZE: 14pt" face="Times New Roman"> but nothing works.
Can anyone help?

J
Jane 8/27/2007

Hi,
to edit font style of edited text open generated include/commonfunctions.php file, locate BuildEditControl function, find this code:

{

if($edit==MODE_SEARCH)

echo '<input type="text" autocomplete="off" name="'.$cfield.'" '.GetEditParams($field).' value="'.htmlspecialchars($value).'">';

else

echo '<input type="text" name="'.$cfield.'" '.GetEditParams($field).' value="'.htmlspecialchars($value).'">';

}

and replace it with this one:

{

if($edit==MODE_SEARCH)

echo '<input type="text" autocomplete="off" name="'.$cfield.'" '.GetEditParams($field).' value="'.htmlspecialchars($value).'" style="FONT-SIZE: 14pt" face="Times New Roman">';

else

echo '<input type="text" name="'.$cfield.'" '.GetEditParams($field).' value="'.htmlspecialchars($value).'" style="FONT-SIZE: 14pt" face="Times New Roman">';

}

G
gr8hands author 8/27/2007

Would this be in the following location:
C:\Program Files\PHPRunner4.0\projects\Project2\output\include\commonfunctions.php
or one of the other locations?
I changed that file, and then uploaded "all files in the output directory" but it didn't change anything on the website when I went back to check.
I'm having difficulty with the Text Field data that gets returned. Everything else is the correct font face and size. It's only the data that isn't changing font.
[Edit] Oops. I pressed "Build" from within PHPRunner, and it overwrote the commonfunctions.php file. Does this mean I'm going to have to manually change that every time, or make a change to the main program include file?
Also, will I need to do the same thing to the Text Area, or Date fields as well? I will need to be able to edit every kind of data output.
If I need to be able to have one Text Field data be a different font from the others, how do I go about doing that?

Admin 8/29/2007

Hi,
there is another way to do that.

Open your page in Visual Editor, swith to HTML mode and add this code to the beginning of file just after BODY tag:

{literal}

<style>

input,select,textarea {

font-size: 14px;

font-family: Times New Roman;

}

</style>

{/literal}

G
gr8hands author 8/29/2007

Alexey,
Thank you for the suggestion. (it does, however, need to be 14pt to get to the right size font)
I'm still needing to know how to make one text field (or text area) one font/size, and another text field a different font/size on the same page -- in order to create emphasis onscreen.
Any suggestions?