keat Posted January 27, 2017 Share Posted January 27, 2017 I've copied the html from the contact form, cleaned and removed multiple contact entries as I want to have a contact form on a document page. But for whatever reason, and I can't figure out, it's messing up. <form action="https://www.xxxx.uk/index.php?_a=contact" method="post"> <div><label for="contact_name">Name</label><span><input type="text" name="contact[name]" id="contact_name" value="" class="textbox required" /></span></div> <div><label for="contact_email">Email</label><span><input type="text" name="contact" id="contact_email" value="" class="textbox required" /></span></div> <div><label for="contact_dept">Department</label> <span><select name="contact[dept]" id="contact_dept" class="textbox required"> <option value=>Tyre Enquiries</option> </select></span> </div> <div><label for="contact_subject">Subject</label><span><input type="text" name="contact[subject]" id="contact_subject" value="" class="textbox required" /></span></div> <div><label for="contact_enquiry">Enquiry</label><span><textarea name="contact[enquiry]" id="contact_enquiry" class="textbox required" cols="40" rows="7"></textarea></span></div> <div><input type="submit" class="button_default" value="Send Message" /></div> </form> When I'm in the document dersigner, the "Send Message" button jumps out of the design area and takes up the place where the save document button should be. Can anyone spot why ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 27, 2017 Share Posted January 27, 2017 I'm thinking pasting some kinds of code into the editor's Source mode is not the optimum way to do it. When CKEditor then wants to show it, even though the editor's compose window sits inside an iframe, certain of that HTML does interfere with the HTML of the rest of the page. Try composing the form using the editor's tool buttons. Quote Link to comment Share on other sites More sharing options...
keat Posted January 30, 2017 Author Share Posted January 30, 2017 I can't see any tool buttons that would enable me to create a contact form Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2017 Share Posted January 30, 2017 In admin, Documents, click the Edit icon of any document. On the next screen click the Content tab. Are you presented with a text editor having three rows of toolbar buttons? If so, on the top row, the right-most group of buttons are those that let you build a form. If there are no toolbar buttons, then we need to figure out why there is no 'rich-text' editor showing. Quote Link to comment Share on other sites More sharing options...
keat Posted January 31, 2017 Author Share Posted January 31, 2017 Mine is missing something ?? The site is running 6.10, I have what I believe to be a clean version of 6.10 on a spare domain and this is the same. I was going to try and perform an update on the spare, but this requires PHP 5.4, I'm still running 5.3.29 due to a few very old V3 sites. so I copied includes/ckeditor folder from V6.13 to my test site and now these additional tabs have appeared. Maybe 6.10 is missing these from CKeditor ?? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2017 Share Posted January 31, 2017 It was either CC609 or CC610 that since has the later version of CKEditor (indicated by the presence and use of the 'moono' skin - toolbar is black and white). So, your experience is strange. But, you say you now have the (stark-looking) CKEditor available? Quote Link to comment Share on other sites More sharing options...
keat Posted January 31, 2017 Author Share Posted January 31, 2017 I have a mono editor now. I can work around the form now, but having issues compiling the php the fit in with my form Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2017 Share Posted January 31, 2017 Please know that CubeCart considers a Site Document as simply plain content. CubeCart has recently implemented the option of passing that content through the Smarty parser to solve display logic decisions. Any PHP programming related to the form will need to be done prior to acquiring the document from the database. CubeCart does not provide a way to evaluate PHP statements that may be present in a document's contents. On the other hand, Smarty does provide a very limited ability to use some PHP commands. (On the third hand, Smarty allows for third-party plugins that will do whatever can be programmed into a PHP script.) On the fourth hand, there is a hook available that can manipulate the document's content prior to assigning it to Smarty's variable array. So, please let us know what you are wanting to do and maybe we can determine the best approach. Quote Link to comment Share on other sites More sharing options...
keat Posted February 1, 2017 Author Share Posted February 1, 2017 I'm still having a few issues with the form builder, in the respect that I design the form, and then if i want to go back and maybe add any aditional fields, then submit button jumps out of the box again. This then effects the save button, meaning that you can't make any additional changes. So either I lose all my work, or now have to copy and past the source html code. Staus Quo. edit: It seems that the issue starts when I add a text area, adding text fields is OK As for the PHP side, I've got this working, but for the life of me can't get the formatting to work. The data is coming back as a single string. Quote Link to comment Share on other sites More sharing options...
keat Posted February 1, 2017 Author Share Posted February 1, 2017 I basically created a new document which contains a contact form. It's related to vehicle tyres, the customer completes the form with his requirements: we shop around and call him back with a price. My php email post script currently looks like this. <?php $ToEmail = "[email protected]"; $EmailSubject = "Tyre Request"; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "".$_POST["width"]."" ; $MESSAGE_BODY .= "-".$_POST["profile"]."" ; $MESSAGE_BODY .= "-".$_POST["rim_size"]."" ; $MESSAGE_BODY .= "-".$_POST["speed_rating"].""; $MESSAGE_BODY .= " Name :".$_POST["name"].""; $MESSAGE_BODY .= " Email :".$_POST["email"].""; $MESSAGE_BODY .= " Postcode :".$_POST["postcode"].""; $MESSAGE_BODY .= " Tel :".$_POST["telephone"].""; $MESSAGE_BODY .= " Info :".$_POST["info"].""; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); ?> Your message was sent <?php But the emailed detials look like this. 35-40-R10-P Name :my name Email :[email protected] Postcode :kk23 456 Tel :12121212 Info :more info I'm no doubt doing something fundamentally incorrect, but i guess not knowing PHP, I could be excused. Quote Link to comment Share on other sites More sharing options...
keat Posted February 1, 2017 Author Share Posted February 1, 2017 Content-type: text/plain'; fixed this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.