if ($makeOrder) {
//
Ordering does not yet work. Test phase only.
?>
If you have your artwork ready, you can place your order here, directly.
}
$sf = new SubmitForm("enquiry", $null=null, null, null, 2);
/*///Pre-fill if logged in
if ($webuser->isLoggedIn()) {
$tppUser = sqlr("select iif(length(ContactName)>0,ContactName,Username) as YourName,
iif(length(tppUsers.EmailAddress)>0,tppUsers.EmailAddress,Email) as EmailAddress, PhoneNumber, City, Postcode, tppUsers.*, ExternalUsers.* from (ExternalUsers left join tppUsers on tppUsers.euId = ExternalUsers.euId) where ExternalUsers.euId = ".$webuser->id);
$tppUser->removeFields(array("Password", "SessionId", "euId"));
$sf->addRecordsetFiller($tppUser);
}*/
$sf->setFields(array(
"YourName" => new TextEl("YourName", "My name"),
"CompanyName" => new TextEl("CompanyName", "Company name"),
"EmailAddress" => new TextEl("EmailAddress", "Email"),
"PhoneNumber" => new TextEl("PhoneNumber", "Phone"),
"Postcode" => new TextEl("Postcode", "Postcode"),
"City" => new TextEl("City", "City"),
"FaxNumber" => new TextEl("FaxNumber", "Fax"),
"MobileNumber" => new TextEl("MobileNumber", "Mobile"),
"Address" => new TextEl("Address", "Address"),
"Website" => new TextEl("Website", "Website"),
"InterestedIn" => new TextEl("InterestedIn", "Interested in"),
"Message" => new TextAreaEl("Message", "Message"),
));
///Simplified...
$sf->setFieldProperties("CompanyName", array("colspan" => 2));
$sf->setFieldProperties("YourName", array("colspan" => 2));
if ($upload && !$makeOrder) {
$sf->setRequired(array("CompanyName", "YourName", "EmailAddress"));
}
else {
$sf->setRequired(array("CompanyName", "YourName", "PhoneNumber", "EmailAddress", "Postcode"));
}
/*$sf->setLabels(array("CompanyName" => "Name or Company"));
$sf->setHidden(array("YourName", "PhoneNumber",
"FaxNumber", "MobileNumber", "Address", "City", "Postcode",
"Website"));*/
$commonFields = array("CompanyName", "YourName", "PhoneNumber", "FaxNumber",
"MobileNumber", "Address", "EmailAddress", "Website");
/*foreach ($commonFields as $f) {
$sf->setFieldHtmlProps($f, array(
"onkeyup" => "gbid('previewDetails_".$f."').value=this.value; updatePreview('".$f."');",
"onchange" => "gbid('previewDetails_".$f."').value=this.value; updatePreview('".$f."');",
));
}
$addr = array(
"onkeyup" => "gbid('previewDetails_Address').value = this.form.enquiry_Address.value +', '+ this.form.enquiry_Postcode.value; updatePreview('Address');",
"onchange" => "gbid('previewDetails_Address').value = this.form.enquiry_Address.value +', '+ this.form.enquiry_Postcode.value; updatePreview('Address');",
);
$sf->setFieldHtmlProps("Address", $addr);
$sf->setFieldHtmlProps("Postcode", $addr);*/
function sfArtwork($f, $v) {
$f = new FileUploadEl("enquiry_Artwork", "");
$f->setProps(array("onchange" => "fileUpChange(this)"));
?>
$f->run();
?>
Maximum total file size is 40MB.
}
if ($upload) {
$sf->clearable = false;
$sf->submitLabel = "Send";
$sf->setFields(array(
"artlabel" => new LabelEl("artlabel", '
Artwork
', 2),
"Artwork" => new InEl("Artwork", "Upload your file", 'sfArtwork'),
"yourdetailslabel" => new LabelEl("yourdetailslabel", '
Your Details
', 2),
"artworklabel" => new LabelEl("artworklabel", '
The file will need to be either a .pdf or a .zip file with a .pdf inside. Make sure the .pdf follows our requirements, which can be found
here.
', 2, EL_LABELGAP),
"artworkforlabel" => new LabelEl("artworkforlabel", '
Include the invoice number or any other details that identify the artwork.
', 2, EL_LABELGAP),
));
$sf->moveFields(array("artlabel", "Artwork", "artworklabel", "yourdetailslabel"), null);
$sf->moveFields(array("InterestedIn", "artworkforlabel"), "artworklabel");
$sf->setLabels(array("Message" => "Extra
Comments", "InterestedIn" => "What is artwork for?"));
$sf->setFieldProperties("Message", array("htmlLabel" => true));
$sf->setFieldProperties("Artwork", array("colspan" => 2));
$sf->submitLabel = "Upload";
}
else if ($makeEnquiry || $id==-1) {
$sf->clearable = false;
$sf->submitLabel = "Send";
}
else if ($makeOrder) {
$sf->clearable = false;
$sf->setFields(array(
"InterestedIn" => new InEl("InterestedIn", "Item", cf('$t,$v','hecho($v);?>
'), true),
"Price" => new InEl("Price", "Price", cf('$t,$v','echo toCurrency($v);?>
')),
"itemlabel" => new LabelEl("itemlabel", '
Item
', 2),
"yourdetailslabel" => new LabelEl("yourdetailslabel", '
Your Details
', 2),
"artlabel" => new LabelEl("artlabel", '
Artwork
', 2),
"Artwork" => new InEl("Artwork", "Upload your file", cf('$t,$v','
$f = new FileUploadEl("enquiry_Artwork", "");
$f->run();
')),
"artworklabel" => new LabelEl("artworklabel", '
The file will need to be either a .pdf or a .zip file with a .pdf inside. Make sure the .pdf follows our requirements, which can be found
here.
', 2, EL_LABELGAP),
"deliverylabel" => new LabelEl("deliverylabel", '
Delivery Details
', 2),
"DeliveryType" => new LookupEl("DeliveryType", "Delivery Type", new Recordset(array("d1"), array("Pick Up", "Courier"))),
"DateRequired" => new TextEl("DateRequired", "Date Required"),
"DeliveryAddress" => new TextAreaEl("DeliveryAddress", "Delivery Address"),
"deliveryaddresslabel" => new LabelEl("deliveryaddresslabel",
'
You can leave the delivery address blank if the same as above.
',
2, EL_LABELGAP),
));
$sf->moveFields(array("itemlabel", "InterestedIn", "Price", "artlabel", "Artwork", "artworklabel", "yourdetailslabel"), null);
$sf->setLabels(array("Message" => "Extra
Comments"));
$sf->setFieldProperties("Message", array("htmlLabel" => true));
$sf->submitLabel = "Continue";
}
else {
$sf->noDefaultButtons = true;
}
$sf->collapse = false;
foreach (array("Message", "Website", "InterestedIn", "Price") as $f) {
if ($sf->hasField($f)) {
$sf->setFieldProperties($f, array("colspan" => 2));
}
}
$sf->run();
?>
NOTE:
if (!$upload) {
?>Price shown includes printing, GST, download and delivery (within Australia), and only applies
to the product listed on this webpage and ordered via the web site.
}
?>A $30 Service fee will apply to all phone orders.
Artwork design and special pms colours extra. An artwork fee may apply
if artwork is not supplied to the specifications.
Artwork specifications can be found here.
The Print Place reserves the right to accept or reject orders or
withdraw products from sale at any time.
}
if ($design) {
include("design.php");
}
?>