I am building a site in drupal and have a php form in it, due to certain annoyances with module building I need to generate a background image and margin for my form in PHP and, whilst i imagine this is basic, I do not know how to put this in or where! The code is as follows:
<?php
function fidelity_website_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Apply Now');
return $blocks;
case 'configure':
$form['form_email'] = array(
'#type' => 'textfield',
'#title' => t('Email address to send the form when it is filled out.'),
'#default_value' => variable_get('apply_now_email', 'yfreeman@fidelitypayment.com'),
);
return $form;
case 'save':
variable_set('apply_now_email', $edit['form_email']);
break;
case 'view':
$block['subject'] = t('Apply Now');
// We theme our array of links as an unordered list.
$output .= drupal_get_form('fidelitywebsite_applynowform');
$block['content'] = $output;
return $block;
break;
}
}
function fidelitywebsite_applynowform($args){
$form = array();
$form['name'] = array(
'#title' => t('Name'),
'#size' => 15,
'#type' => 'textfield',
);
$form['company'] = array(
'#title' => t('Company'),
'#size' => 15,
'#type' => 'textfield',
);
$form['email'] = array(
'#title' => t('Email'),
'#size' => 15,
'#type' => 'textfield',
);
$form['phone'] = array(
'#title' => t('Phone'),
'#size' => 15,
'#type' => 'textfield',
);
$form['process'] = array(
'#type' => 'submit',
'#value' => t('Apply Now!')
);
return $form;
}
function fidelitywebsite_applynowform_submit($form, &$form_state){
$values = $form_state["values"];
$subject = "Fidelitypayment.com Apply Now Form";
$name = check_plain($values["name"]);
$company = check_plain($values["company"]);
$email = check_plain($values["email"]);
$phone = check_plain($values["phone"]);
$body = "Name: $name
Company: $company
Phone: $phone
Email: $email";
ini_set("sendmail_from", "donotreply@fidelitypayment.com");
ini_set("SMTP", "smtp.fidelitypayment.com");
$mssg_from = "From: Fidelity Payment Services <donotreply@fidelitypayment.com>";
mail(variable_get('apply_now_email', 'yfreeman@fidelitypayment.com'), $subject, $body, $mssg_from);
drupal_set_message("Thank you very much for your application, a Fidelity representative will be in touch with you shortly.", "status");
$form_state["redirect"] = "node";
}
and I would like a margin of 5 and an image behind everything, many thanks to anyone that can help with this!!!
gettext translates ALWAYS?
I'm using gettext with the new version of XAMPP (5.3.0) on Windows Seven RTM (build 7600)gettext-support is enabled.It used to work perfectly a few weeks ago.I'm not quite sure what changed this. Be
Alternate messaging
I have 4 strings in MySQL db1$string1 : Hello$string2 : Hi$string3 : Great$string4 : ThanksAnd I have 3 accounts MySQL db2$User1 : $Pw1$User2 : $Pw2$User3 : $Pw3expected result---------------Hello
Help with page encoding issue and weird characters
I'm trying to write a screen scraper and when I pull out the lines of the html file that I'm interested in and put them in a variable, I end up with a few extra weird characters in my string that I
PHP onsubmit in the form not going to the fuction.
I have a form through ‘onsubmit’ calling a function validation(). But not going to the function at all. Why?<form action="member.php" method="post"
Amatuer requiring assistance
Beginner and amateur in need of assistanceMy Site - (Spare Parts for Domestic Appliances)I've gone as far as I can go on my own and need guidanceWhat I require is custom searches - I need to return
pageination not working right... coping images over 4 pages
Code: <?php //This code will obtain the required page number from the $_GET array. Note that if it is not present it will default to 1.if (isset($_GET['pageno'])) { $pageno =
MySQL query problem
When I try to run the following piece of code, I get this error:QuoteWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/muskelmann098/public_html/build.php on line
What are the two different files you download to update kernel?
What are the two different files you download to update kernel?
Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would like to add some meta to the website but the index file is just a bunch of classes and includes so
Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow people to login but prevent multiple logins with the same username. Everything appears to work fine