http://xtreme-traction.com/YOUTH/free-publications.html
On my form what would I need to add; so, when an object is chosen or text fields filled out it changes to a set color when the results are emailed?
Example:
HCYR Corral newsletter yes
HCYR information packet no
Hill Country Youth Ranch compilation DVD no
Big Springs Ranch for Children compilation DVD no
Macaroni at Midnight no
Prisoner of the Clay CD none
Poetry books by children none
Name William H Braid III
Mailing Address 1830 Whitney Street
Home phone 706.736.1557
Cell phone 706.550.2889
Email trey.braid@email.com
On my form what would I need to add; so, when an object is chosen or text fields filled out it changes to a set color when the results are emailed?
Example:
HCYR Corral newsletter yes
HCYR information packet no
Hill Country Youth Ranch compilation DVD no
Big Springs Ranch for Children compilation DVD no
Macaroni at Midnight no
Prisoner of the Clay CD none
Poetry books by children none
Name William H Braid III
Mailing Address 1830 Whitney Street
Home phone 706.736.1557
Cell phone 706.550.2889
Email trey.braid@email.com
Hi Trey,
To change the colour in the form when an item is checked you'd need to use JavaScript to alter the CSS styling for that ite,
To change the colour in an email you'd need to use PHP in a Custom Code action also to change the CSS styling of the element.
Bob
To change the colour in the form when an item is checked you'd need to use JavaScript to alter the CSS styling for that ite,
To change the colour in an email you'd need to use PHP in a Custom Code action also to change the CSS styling of the element.
Bob
Hi Trey,
It's impossible to say what the code *should* be; this is a form using your custom HTML and a custom Email template. I guess that the minimum to change the color would be two change the CSS for that line.
It's impossible to say what the code *should* be; this is a form using your custom HTML and a custom Email template. I guess that the minimum to change the color would be two change the CSS for that line.
<?php
$email_template = array();
$color = 'black';
if ( $form->data['some_input'] == 'yes' ) {
$color = 'red';
}
$email_template[] = "<p style='color: {$color};'>Some text here</p>";
// repeat as necessary
$form->data['email_template'] = implode("/n", $email_template);
?>
Considering I had no idea what you were telling me yesterday...I guess just adding this code will not take care of the issue and I'd still be at square 1 trying to figure this and that out.
Thanks for helping and sorry I just don't understand this completely...
Trey
Thanks for helping and sorry I just don't understand this completely...
Trey
Hi Trey,
Like most of the code posted here it's an example. You need to adapt it to your particular form elements. In $form->data['some_input'] you need to replace some_input with the name of an input in your form.
Where it says some text here that needs to be replaced with the text you want to show in your email.
Where it says //repeat as necessary then you can repeat the preceding chunk of code if you need to format more than one form input.
Bob
Like most of the code posted here it's an example. You need to adapt it to your particular form elements. In $form->data['some_input'] you need to replace some_input with the name of an input in your form.
Where it says some text here that needs to be replaced with the text you want to show in your email.
Where it says //repeat as necessary then you can repeat the preceding chunk of code if you need to format more than one form input.
Bob
...that's the problem Bob, I don't understand what I should put for some_input.
Thanks
Trey
Thanks
Trey
Hi Trey,
As I've already said . . . the name of an input in your form
Each input has a name.
Bob
As I've already said . . . the name of an input in your form
Each input has a name.
Bob
ok do i need to put an "_" before it or just the field name?
thanks for your patience
trey
thanks for your patience
trey
This topic is locked and no more replies can be posted.