TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 459
  • Total: 459

Generic Application Form

Started by JPDeni, May 23, 2009, 11:04:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EasyRider

Hey JPDeni, is maybe possible to add some style in  the final review..?   :) :)

Like bold or color text:

""Recruitment application has been made by ... xvxvz

Heading
Name: farkle
Age: 18
Sex: F
Do you like me?: Yes
Comments: should have the original subject line""
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

EasyRider

Quote from: JPDeni on September 23, 2009, 08:16:12 PM
:) There's lots of different stuff you can do with this form. I like try new things and it's interesting to see what different things people come up with that I can figure out.


SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

JPDeni

:)

You can add formatting however you want. Just add BBCode to the post:


if ($field['type'] == 'heading')
$postbody .= $field['caption'] . '<br />';
else
$postbody .= '[b]' . $field['caption'] . '[/b]: ' . $_REQUEST[$field['name']] . '<br />';


That will make each line the same, with the caption in bold print. If you want to do different formatting for different lines, it's a little more work.


if ($field['type'] == 'heading')
$postbody .= $field['caption'] . '<br />';
elseif ($field['caption'] == 'Comments')
$postbody .= '[b][color=red]' . $field['caption'] . '[/color][/b]: ' . $_REQUEST[$field['name']] . '<br />';
else
$postbody .= '[b]' . $field['caption'] . '[/b]: ' . $_REQUEST[$field['name']] . '<br />';


This will just make the Comments caption in red.

EasyRider

I m not sure were put this lines to work..  :-\ 
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

JPDeni

I'm sorry. Look for the section:


if ($enable_post) {  //create new forum post with application

$postbody = 'Recruitment application has been made by ' . $context['user']['name'] .'<br /><br/>';
foreach ($fielddef as $field) {
if ($field['type'] == 'heading')
$postbody .= $field['caption'] . '<br />';
else
$postbody .=  $field['caption'] . ': ' . $_REQUEST[$field['name']] . '<br />';
}


You want to change the $postbody lines.

EasyRider

Thank you JPDeni.. :)  i try it once with no success, but is little late in my time zone..

I check it tomorrow  again and i tell you  what happen.


Good night dear..  :) :) :)
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

JPDeni

Possibly I was unclear as to what you needed to do, because I made the change and it worked perfectly.

Find


if ($enable_post) {  //create new forum post with application

$postbody = 'Recruitment application has been made by ' . $context['user']['name'] .'<br /><br/>';
foreach ($fielddef as $field) {
if ($field['type'] == 'heading')
$postbody .= $field['caption'] . '<br />';
else
$postbody .=  $field['caption'] . ': ' . $_REQUEST[$field['name']] . '<br />';
}


and replace it with


if ($enable_post) {  //create new forum post with application

$postbody = 'Recruitment application has been made by ' . $context['user']['name'] .'<br /><br/>';
foreach ($fielddef as $field) {
                                       if ($field['type'] == 'heading')
$postbody .= $field['caption'] . '<br />';
elseif ($field['caption'] == 'Comments')
$postbody .= '[b][color=red]' . $field['caption'] . '[/color][/b]: ' . $_REQUEST[$field['name']] . '<br />';
else
$postbody .= '[b]' . $field['caption'] . '[/b]: ' . $_REQUEST[$field['name']] . '<br />';
}

EasyRider

Hi JPDeni.  :)

Thank you. I go to check it now..  :up:
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

EasyRider

The bold caption work  perfect..!  :) but i can't see the color (red) in text area..

Is possible to add space between the captions..? i mean like this:

Heading
empty space
Name: farkle
Age: 18
Sex: F
Do you like me?: Yes
emty space
Comments: should have the original subject line""

SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

JPDeni

Which code did you enter? I gave you two sets of code earlier. The first only will bold the caption. The second adds the red. (I was showing you different options. :) )

It's possible to format it any way you want. Tell me exactly how you want it formatted and I'll post the code. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.