Customize Ektron HTML Form Email Layout - html

I would like to know if there's a way to customize the email HTML body contents when submitting an Ektron HTML form.
For example, a form is submitted and the form data is emailed to john#doe.gov. Upon opening the email, there is a table containing the data from the submitted form. I want to know if there's a way to modify the HTML table which was generated for that email.
My goal is to experiment with some CSS to force word-wrapping in the table so lengthy textarea-input data will be wrapped appropriately.

I've never tried customizing it, so I don't know if there are any "gotchas", but these files look promising:
/Workarea/controls/forms/DefaultFormEmailBody.xslt
/Workarea/controls/forms/template_FormDataDisplay.xslt
/Workarea/controls/forms/template_FormFieldValue.xslt
The table is generated in "template_FormDataDisplay.xslt", and the individual table rows are generated in "template_FormFieldValue.xslt".
The usual "I want to modify something in the workarea" warning applies: Make backups of any file you change, and know that installing an upgrade to Ektron will overwrite any of your changes.

Are you using php? Because you can edit the way that email looks once you open it. This is an awesome tutorial:
http://tangledindesign.com/how-to-create-a-contact-form-using-html5-css3-and-php/

Related

How can I get our WYSIWYG editor to stop removing HTML comments, CSS classes and inline styles?

We currently use wysihtml5-rails to let our users edit emails before they are sent but this is not working out so well for a few reasons.
I need the comments to allow for Outlook specific comments like these . All comments are being removed, currently.
I also need the CSS classes to be untouched as the editor content will be a pre-generated email that includes CSS classes. Our editor will only keep classes that are whitelisted but this is annoying as we need to update that list with every change.
Same goes for inline styles. Some of the styles in the generated email are inline instead of in classes. Those need to be kept but they are being removed.
Is there any way I can get our editor to work this way?
I found a solution but it's hacky.
I realized that the raw HTML was being stored on the page in a hidden textarea tag. Interestingly, all the elements that I needed (CSS classes, comments) were still there. But when submitting the form, the value of this textarea was replaced with the parsed results from the editor which gets sent to the server. All the comments and classes are gone from this text.
The solution was then to create a second field that takes the unparsed value from the WYSIWYG editor and sends that along. Easy in rails but just making this new field part of a form. Then the controller can choose which value to take. In my case, I renamed the existing message field to parsed_message. Then added a new message field which will hold the unparsed message.
The WYSIWYG editor we are using allows this by having a method that can be called at any time: window.email_editor.getValue(). Here the email_editor is the editor instantiated by the javascript on the page.

Clipboard functionality in email template

I want to send a coupon code in the email template.
A Small button that will copy the content of a input element on the clipboard.
By email Template, i mean i want to send a email which will have a coupon code and there will be a button in the email template which will allow me to copy it to clipboard. Can this be done?
Any help will be appreciated.
Considering that javascript cannot be added inline to the email template, i couldnt think of any other solution.
Short answer is No - This feature would require Javascript.
Long answer - Yes (in a different way) - You could use unique query strings on the button URL (eg ?USER=1&COUPON_CODE=123) that way you could automatically carry the unique coupon code from the email to the landing page form field.
To do this you could assign each member in your database a unique coupon within the CSV file (or whatever you use) and set up a merge field within your ESP and use that to automatically create the strings. For example, your string would look like this when you code it href="http://www.yousite.com/?[%coupon%]" and your ESP will do the rest providing the database is set up correctly.
Hope that makes sense.
Since clipboard's content is changed with javascript, there is no way to do that in an email.
You could, however, build an URL with the coupon code as parameter.

Contact form HTML, Returning a "Success" text in the .html file

i have this question and i can't find a solution. I'm pretty new in the programming. So..
my HTML file with the form is contact.html (straight html file)
The php code is in separated file. So, everythings work fine, but..
I want to have the return text for the "success" or "fail" in the in my html file (let's say under the submit button). Is it possible if it's not php file with html code, but straight html. And can you tell me what should I do?
I hope you understand me.
Straight HTML can't give different content conditionally.
You could get something that resembles what you describe by placing an iframe after the form and targeting it with the form. As solutions go, that's rather ugly.
You could use JavaScript to send the form data to the PHP file and then modify the DOM of the HTML document based on the response (Ajax), but that would be unnecessarily complex and violate the best practise of unobtrusive JavaScript.
The usual approach to this problem is to have a PHP file being the single entry point for all things relating to the form (it can keep parts of its logic or HTML in other files and include() them as needed) and have it decide, based on what input receives, if it should show:
The plain form
The form with error messages (and pre-populated with the user's incorrect submitted data)
The thank-you

Form Data to HTML Email

I have a rails application with a form for job applicants. Right now, when a user fills out the form the data is sent to an email in this format:
Position_Applied_For:
Name:
Telephone_Number:
Alt_Telephone_Number:
Physical_Address:
How_Long_At_Address:
Desired_Salary_Or_Hourly_Rate:
Specified_Hours:
Date_Can_Start_Work:
etc..
I'm trying to have the output sent to look like an actual job application using html to make the document and have the parameters fill the fields in the document. What would be the best solution to accomplish this?
Thanks!
Not sure what are you asking for exactly.. refer this link action mailer design.
You can edit mailer template in views and design its style using css, to look like job application.

Add an html checkbox in OTRS ticket submit page

I'm new to OTRS and I have to add an HTML checkbox with some text in the ticket submit page. Essentially, I need the user to accept a privacy statement (clicking on the checkbox) before he submits a new ticket. Hence, the submit button has to be enabled only after the user clicks on the checkbox. How can I do this?
I know HTML, but I don't know OTRS architecture so I can't figure out how can I modify HTML pages.
In Kernel->Output->HTML->Standard I've founded HTML templates (*.dtl), but:
I don't know which elements are part of ticket submitting page;
I don't know if I need to modify an existing template, adding HTML, or to create a new template (in this second case I think I should modify some perl module that call the layout, but which one!?!)
I'm trying to open .dtl files to understand which I've to modify, but Firefox can't render them correctly; how can I open them?
If you want customers to accept a privacy statement you don't need to code.
You can simply go to Admin > SysConfig > Framework > Frontend::Customer and activate the CustomerPanelPreApplicationModule###CustomerAccept module, and the InfoKey and InfoFile values. When the customer logs in the text in the InfoFile is displayed and the customer needs to accept this. After accepting the InfoKey is stored in the User Preferences. This way the system will not bother asking permission to the customer again, and if you might change the policy you can change the key as well, displaying the message when needed.
For your questions on .dtl files: these are plain HTML files, but different blocks are rendered by the files located under Kernel/Modules.
If you want to modify the page that is used for submitting new tickets, it's this file:
CustomerTicketMessage.dtl. You can edit these files with any text editor.