Requirement
Ox Tools Global wants to set up an NPS survey within NetSuite. The customers will receive an email once in 90 days. The user will click on the number from 1 to 10 to add customer Feedback value. The reporting feature is also required.
Solution
We will create a script to execute daily and pick random active pre-selected customers. An email will be sent to the Customer Primary Contact’s email address, rather than the standard email address field with the following content.
Subject: Hi, just a question about Ox Tools.
Upon clicking the score, the user will navigate to a new page that shows a page for adding a comment
If the user clicked more than one number within 90 days, then the latest entry will be kept in NetSuite.
A custom field will be created in the customer’s record to store the last date of the NPS survey sent. No customers will receive an NPS survey within 90 days twice. The response from the user will be stored in the custom record and will be tagged to the corresponding customer record.
//JJ MR Email Survey OTGA-1515.js
/**
* @NApiVersion 2.1
* @NScriptType MapReduceScript
*/
define(['N/currentRecord', 'N/email', 'N/error', 'N/format', 'N/https', 'N/record', 'N/runtime', 'N/search', 'N/task', 'N/url','N/file','N/render'],
/**
* @param{currentRecord} currentRecord
* @param{email} email
* @param{error} error
* @param{format} format
* @param{https} https
* @param{record} record
* @param{runtime} runtime
* @param{search} search
* @param{task} task
* @param{url} url
* @param{file} file
* @param{render} render
*/
(currentRecord, email, error, format, https, record, runtime, search, task, url,file,render) => {
const dataSets = {
/**
* @description Object referencing NetSuite Saved Search
* @typedef {Object} SearchObj
* @property {Object[]} filters - Filters Array in Search
* @property {Object[]} columns - Columns Array in Search
*/
/**
* @description to format Saved Search column to key-value pair where each key represents each columns in Saved Search
* @param {SearchObj} savedSearchObj
* @param {void|String} priorityKey
* @returns {Object.<String,SearchObj.columns>}
*/
fetchSavedSearchColumn(savedSearchObj, priorityKey) {
let columns = savedSearchObj.columns;
let columnsData = {},
columnName = '';
columns.forEach(function (result, counter) {
columnName = '';
if (result[priorityKey]) {
columnName += result[priorityKey];
} else {
if (result.summary)
columnName += result.summary + '__';
if (result.formula)
columnName += result.formula + '__';
if (result.join)
columnName += result.join + '__';
columnName += result.name;
}
columnsData[columnName] = result;
});
return columnsData;
},
/**
* @description Representing each result in Final Saved Search Format
* @typedef formattedEachSearchResult
* @type {{value:any,text:any}}
*/
/**
* @description to fetch and format the single saved search result. ie, Search result of a single row containing both text and value for each columns
* @param {Object[]} searchResult contains search result of a single row
* @param {Object.<String,SearchObj.columns>} columns
* @returns {Object.<String,formattedEachSearchResult>|{}}
*/
formatSingleSavedSearchResult(searchResult, columns) {
let responseObj = {};
for (let column in columns)
responseObj[column] = {
value: searchResult.getValue(columns[column]),
text: searchResult.getText(columns[column])
};
return responseObj;
},
/**
* @description to iterate over and initiate format of each saved search result
* @param {SearchObj} searchObj
* @param {void|Object.<String,SearchObj.columns>} columns
* @returns {[]|Object[]}
*/
iterateSavedSearch(searchObj, columns) {
if (!checkForParameter(searchObj))
return false;
if (!checkForParameter(columns))
columns = dataSets.fetchSavedSearchColumn(searchObj);
let response = [];
let searchPageRanges;
try {
searchPageRanges = searchObj.runPaged({
pageSize: 1000
});
} catch (err) {
return [];
}
if (searchPageRanges.pageRanges.length < 1)
return [];
let pageRangeLength = searchPageRanges.pageRanges.length;
for (let pageIndex = 0; pageIndex < pageRangeLength; pageIndex++)
searchPageRanges.fetch({
index: pageIndex
}).data.forEach(function (result) {
response.push(dataSets.formatSingleSavedSearchResult(result, columns));
});
return response;
}
}
/**
* @description Check whether the given parameter argument has value on it or is it empty.
* ie, To check whether a value exists in parameter
* @param {*} parameter parameter which contains/references some values
* @param {*} parameterName name of the parameter, not mandatory
* @returns {Boolean} true if there exist a value, else false
*/
function checkForParameter(parameter, parameterName) {
if (parameter !== "" && parameter !== null && parameter !== undefined && parameter !== false && parameter !== "null" && parameter !== "undefined" && parameter !== " " && parameter !== 'false') {
return true;
} else {
if (parameterName)
log.error('Empty Value found', 'Empty Value for parameter ' + parameterName);
return false;
}
}
/**
* @description Function for listing customers who has no survey send or survey send before 90 days.
* @returns {Object} object of result
*/
function customerSearch(){
try{
var customerSearchObj = search.create({
type: "customer",
filters:
[
["isinactive","is","F"],
"AND",
["contactprimary.email","isnotempty",""],
"AND",
[["custentity_jj_last_survey_send_date","isempty",""],"OR",["custentity_jj_last_survey_send_date","within","ninetydaysago"]]
],
columns:
[
search.createColumn({name: "internalid", label: "Internal_ID"}),
search.createColumn({
name: "entityid",
sort: search.Sort.ASC,
label: "Name"
}),
search.createColumn({
name: "email",
join: "contactPrimary",
label: "Email"
}),
search.createColumn({name: "custentity_jj_last_survey_send_date", label: "Last_Survey_Send_Date"})
]
});
var searchResultCount = customerSearchObj.runPaged().count;
log.debug("customerSearchObj result count",searchResultCount);
return dataSets.iterateSavedSearch(customerSearchObj, dataSets.fetchSavedSearchColumn(customerSearchObj, 'label'));
}
catch (e) {
log.debug("Error @ customer Search: ",e.name+" : "+e.message)
}
}
/**
* Defines the function that is executed at the beginning of the map/reduce process and generates the input data.
* @param {Object} inputContext
* @param {boolean} inputContext.isRestarted - Indicates whether the current invocation of this function is the first
* invocation (if true, the current invocation is not the first invocation and this function has been restarted)
* @param {Object} inputContext.ObjectRef - Object that references the input data
* @typedef {Object} ObjectRef
* @property {string|number} ObjectRef.id - Internal ID of the record instance that contains the input data
* @property {string} ObjectRef.type - Type of the record instance that contains the input data
* @returns {Array|Object|Search|ObjectRef|File|Query} The input data to use in the map/reduce process
* @since 2015.2
*/
const getInputData = (inputContext) => {
try{
var customerList = customerSearch()
log.debug("customerList: ",customerList)
var survayedCustomers = []
var unsurvayedCustomers = []
for(var i=0;i<customerList.length;i++){
var last = customerList[i].Last_Survey_Send_Date.value //value of last survey send date from customer record
if(!checkForParameter(last)){
unsurvayedCustomers.push(customerList[i]) //array of customers who hasn't get any survey
}
else {
survayedCustomers.push(customerList[i]) // array of customers who got survey before 90 days
}
}
var filteredCustomers = []
var unsurvayedCustomersLength = 0
var survayedCustomersLength = 0
if(unsurvayedCustomers.length>0){
unsurvayedCustomersLength = unsurvayedCustomers.length
if(unsurvayedCustomersLength > 200) {
for (var i = 0; i < 200; i++) {
filteredCustomers.push({
internalId: unsurvayedCustomers[i].Internal_ID.value,
name: unsurvayedCustomers[i].Name.value,
email: unsurvayedCustomers[i].Email.value,
lastsurvayedDate: unsurvayedCustomers[i].Last_Survey_Send_Date.value
})
}
}
else {
for (var i = 0; i < unsurvayedCustomersLength; i++) {
filteredCustomers.push({
internalId: unsurvayedCustomers[i].Internal_ID.value,
name: unsurvayedCustomers[i].Name.value,
email: unsurvayedCustomers[i].Email.value,
lastsurvayedDate: unsurvayedCustomers[i].Last_Survey_Send_Date.value
})
}
}
}
if(survayedCustomers.length>0){
if(filteredCustomers.length<200){
survayedCustomersLength = Number(200) - Number(filteredCustomers.length)
for(var j =0;j<survayedCustomersLength;j++){
filteredCustomers.push({
internalId: survayedCustomers[j].Internal_ID.value,
name: survayedCustomers[j].Name.value,
email: survayedCustomers[j].Email.value,
lastsurvayedDate: survayedCustomers[j].Last_Survey_Send_Date.value
})
}
}
}
log.debug("unsurvayedCustomersLength: ",unsurvayedCustomersLength)
log.debug("survayedCustomersLength: ",survayedCustomersLength)
log.debug("filteredCustomers LENGTH: ",filteredCustomers.length)
log.debug("filteredCustomers: ",filteredCustomers)
return filteredCustomers;
}
catch (e) {
log.debug("Error @ getInputData: ",e.name+" : "+e.message)
}
}
/**
* Defines the function that is executed when the reduce entry point is triggered. This entry point is triggered
* automatically when the associated map stage is complete. This function is applied to each group in the provided context.
* @param {Object} reduceContext - Data collection containing the groups to process in the reduce stage. This parameter is
* provided automatically based on the results of the map stage.
* @param {Iterator} reduceContext.errors - Serialized errors that were thrown during previous attempts to execute the
* reduce function on the current group
* @param {number} reduceContext.executionNo - Number of times the reduce function has been executed on the current group
* @param {boolean} reduceContext.isRestarted - Indicates whether the current invocation of this function is the first
* invocation (if true, the current invocation is not the first invocation and this function has been restarted)
* @param {string} reduceContext.key - Key to be processed during the reduce stage
* @param {List<String>} reduceContext.values - All values associated with a unique key that was passed to the reduce stage
* for processing
* @since 2015.2
*/
const reduce = (reduceContext) => {
try{
var json_result = JSON.parse(reduceContext.values)
log.debug("json_Result: ",json_result)
var curScript = runtime.getCurrentScript();
var authorParam = curScript.getParameter({
name: 'custscript_jj_mail_author'
})
log.debug("authorParam: ",authorParam)
if(checkForParameter(authorParam)) {
var curDate = new Date()
var npsRec = record.create({
type: 'customrecord_jj_nps_survey_response',
isDynamic: true
})
npsRec.setValue({
fieldId: 'custrecord_jj_customer_name',
value: json_result.internalId
})
npsRec.setValue({
fieldId: 'custrecord_jj_survey_date',
value: curDate
})
npsRec.setValue({
fieldId: 'custrecord_jj_nps_mail_status',
value: 1
})
var saved = npsRec.save()
log.debug("saved: ", saved)
if (checkForParameter(saved)) {
let newEmailTempl = render.mergeEmail({
templateId: 808,
customRecord: {
id: saved,
type: 'customrecord_jj_nps_survey_response'
}
});
let emailBody = newEmailTempl.body;
let emailSubject = newEmailTempl.subject
var objParam = {
recId: saved,
response: ''
}
var extURL = url.resolveScript({ // getting External URL of the suitelet of Feedback
deploymentId: 'customdeploy_jj_sl_nps_survey_otga1515',
scriptId: 'customscript_jj_sl_nps_survey_otga1515',
params: objParam,
returnExternalUrl: true
})
if (checkForParameter(json_result.email)) {
if (checkForParameter(extURL)) {
emailBody = emailBody.replaceAll('url=', extURL);// replacing the URL provided on the email template with the external URL except witht he value of the response
if (checkForParameter(emailBody)) {
email.send({
author: authorParam,
recipients: json_result.email,
subject: checkForParameter(emailSubject) ? emailSubject : 'NPS Survey',
body: emailBody
})
var updated = record.submitFields({
id: saved,
type: 'customrecord_jj_nps_survey_response',
values: {
'custrecord_jj_nps_mail_status': 2
}
})
log.debug("UPDATED: ", updated)
var updatedCustomer = record.submitFields({
id: json_result.internalId,
type: record.Type.CUSTOMER,
values: {
'custentity_jj_last_survey_send_date': checkForParameter(curDate) ? curDate : ''
}
})
log.debug("updatedCustomer: ", updatedCustomer)
}
}
}
}
}
}
catch (e) {
log.debug("Error @ Reduce: ",e.name+" : "+e.message)
}
}
/**
* Defines the function that is executed when the summarize entry point is triggered. This entry point is triggered
* automatically when the associated reduce stage is complete. This function is applied to the entire result set.
* @param {Object} summaryContext - Statistics about the execution of a map/reduce script
* @param {number} summaryContext.concurrency - Maximum concurrency number when executing parallel tasks for the map/reduce
* script
* @param {Date} summaryContext.dateCreated - The date and time when the map/reduce script began running
* @param {boolean} summaryContext.isRestarted - Indicates whether the current invocation of this function is the first
* invocation (if true, the current invocation is not the first invocation and this function has been restarted)
* @param {Iterator} summaryContext.output - Serialized keys and values that were saved as output during the reduce stage
* @param {number} summaryContext.seconds - Total seconds elapsed when running the map/reduce script
* @param {number} summaryContext.usage - Total number of governance usage units consumed when running the map/reduce
* script
* @param {number} summaryContext.yields - Total number of yields when running the map/reduce script
* @param {Object} summaryContext.inputSummary - Statistics about the input stage
* @param {Object} summaryContext.mapSummary - Statistics about the map stage
* @param {Object} summaryContext.reduceSummary - Statistics about the reduce stage
* @since 2015.2
*/
const summarize = (summaryContext) => {
try {
var remainingUsage = runtime.getCurrentScript().getRemainingUsage();
log.debug("GOVRNANCE: ", remainingUsage);
if(remainingUsage<500) {
let mrTask = task.create({
taskType: task.TaskType.MAP_REDUCE,
scriptId: "customscript_jj_mr_email_survey_otga1515",
deploymentId: "customdeploy_jj_mr_email_survey_otga1515",
});
log.debug("Task Created: ", mrTask);
mrTask.submit();
}
} catch (e) {
log.debug("Error @ Summarize: ", e.name + " : " + e.message);
}
}
return {getInputData, reduce, summarize}
});
//JJ SL NPS Survey OTGA-1515.js
/**
* @NApiVersion 2.1
* @NScriptType Suitelet
*/
define(['N/currentRecord', 'N/email', 'N/error', 'N/format', 'N/https', 'N/record', 'N/redirect', 'N/runtime', 'N/search', 'N/file', 'N/ui/serverWidget', 'N/url','N/render'],
/**
* @param{currentRecord} currentRecord
* @param{email} email
* @param{error} error
* @param{format} format
* @param{https} https
* @param{record} record
* @param{redirect} redirect
* @param{runtime} runtime
* @param{search} search
* @param{file} file
* @param{serverWidget} serverWidget
* @param{url} url
* @param{render} render
*/
(currentRecord, email, error, format, https, record, redirect, runtime, search, file, serverWidget, url, render) => {
/**
* @description Check whether the given parameter argument has value on it or is it empty.
* ie, To check whether a value exists in parameter
* @param {*} parameter parameter which contains/references some values
* @param {*} parameterName name of the parameter, not mandatory
* @returns {Boolean} true if there exist a value, else false
*/
function checkForParameter(parameter, parameterName) {
if (parameter !== "" && parameter !== null && parameter !== undefined && parameter !== false && parameter !== "null" && parameter !== "undefined" && parameter !== " " && parameter !== 'false') {
return true;
} else {
if (parameterName)
log.error('Empty Value found', 'Empty Value for parameter ' + parameterName);
return false;
}
}
/**
* Defines the Suitelet script trigger point.
* @param {Object} scriptContext
* @param {ServerRequest} scriptContext.request - Incoming request
* @param {ServerResponse} scriptContext.response - Suitelet response
* @since 2015.2
*/
const onRequest = (scriptContext) => {
try {
var mode = scriptContext.request.parameters.mode;
log.debug("mode: ", mode)
var currentRec = currentRecord.get();
log.debug("currentRec: ", currentRec)
var npsRecIdParam = scriptContext.request.parameters.recId;
log.debug("idParam: ", npsRecIdParam)
var npsResponseParam = scriptContext.request.parameters.response
log.debug("responseParam: ", npsResponseParam)
var curDate = new Date()
log.debug("curDate: ", curDate)
if (checkForParameter(mode)) {
var thanksForm = serverWidget.createForm({
title: ' '
})
var fileObj = file.load({
id: 35423466
})
log.debug("fileObj: ",fileObj)
var htmlContents = fileObj.getContents();
log.debug("htmlContents: ",htmlContents)
thanksForm.addField({
id: 'custpage_thanks_msg',
type: serverWidget.FieldType.INLINEHTML,
label: 'Thanks'
}).defaultValue=htmlContents
scriptContext.response.writePage(thanksForm);
}
else {
if (scriptContext.request.method === 'GET') {
var form = serverWidget.createForm({
title: ' '
})
var fileObj = file.load({
id: 35422462
})
log.debug("fileObj: ", fileObj)
var htmlContents = fileObj.getContents();
log.debug("htmlContents: ", htmlContents)
var htmlFeedback = form.addField({
type: serverWidget.FieldType.INLINEHTML,
id: 'custpage_feedback',
label: 'FeedBack'
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.OUTSIDEABOVE
}).updateDisplaySize({width:'100%',height:'25%'})
htmlFeedback.defaultValue = htmlContents
var npsRecord;
if (checkForParameter(npsRecIdParam)) {
if (checkForParameter(npsResponseParam)) {
npsRecord = record.load({
id: npsRecIdParam,
type: 'customrecord_jj_nps_survey_response',
isDynamic: true
})
npsRecord.setValue({
fieldId: 'custrecord_jj_response',
value: npsResponseParam
})
npsRecord.setValue({
fieldId: 'custrecord_jj_nps_mail_status',
value: 3
})
npsRecord.setValue({
fieldId: 'custrecord_jj_last_response_date',
value: checkForParameter(curDate) ? curDate : ''
})
}
}
var npsUpdated = npsRecord.save()
log.debug("npsUpdated: ", npsUpdated)
// form.addField({
// id: 'custpage_feedback_area',
// type: serverWidget.FieldType.TEXTAREA,
// label: 'Are there any comments you would like to share relating to your feedback?'
// }).updateDisplaySize({
// width: '100%',
// height: '15%'
// }).isSingleColumn = true
var idField = form.addField({
id: 'custpage_nps_rec_id',
type: serverWidget.FieldType.TEXT,
label: 'NPS Record ID'
}).updateDisplayType({
displayType: serverWidget.FieldDisplayType.HIDDEN
})
idField.defaultValue = npsRecIdParam
var responseField = form.addField({
id: 'custpage_nps_response',
type: serverWidget.FieldType.INTEGER,
label: 'Response'
}).updateDisplayType({
displayType: serverWidget.FieldDisplayType.HIDDEN
})
responseField.defaultValue = npsResponseParam
// form.addSubmitButton({
// label: 'Comment'
// })
scriptContext.response.writePage(form);
} else {
log.debug("POST", scriptContext.request.parameters);
// const text = scriptContext.request.getValue
var npsFeedback = scriptContext.request.parameters.commentText
log.debug("POST FeedBack: ", npsFeedback)
var npsRec = scriptContext.request.parameters.custpage_nps_rec_id
log.debug("POST rec: ", npsRec)
if (checkForParameter(npsRec)) {
var npsRecord = record.submitFields({
id: npsRec,
type: 'customrecord_jj_nps_survey_response',
values: {
'custrecord_jj_feedback': checkForParameter(npsFeedback) ? npsFeedback : ''
}
})
log.debug("npsRecord POST: ", npsRecord)
}
let paramObj = {
mode: '2'
}
log.debug("paramObj: ", paramObj)
if (checkForParameter(paramObj)) {
var finalUrl = url.resolveScript({
scriptId: 'customscript_jj_sl_nps_survey_otga1515',
deploymentId: 'customdeploy_jj_sl_nps_survey_otga1515',
params: paramObj,
returnExternalUrl: true
})
log.debug("finalUrl: ",finalUrl)
if(checkForParameter(finalUrl)){
redirect.redirect({
url: finalUrl,
})
}
}
}
}
}
catch (e) {
log.debug("Error @ onRequest: ",e.name+" : "+e.message)
}
}
return {onRequest}
});
.//Email template for Survey Rating
<style type="text/css">/* ******************************************************
Author URI: https://codeconvey.com/
Demo Purpose Only - May not require to add.
font-family: "Raleway",sans-serif;
*********************************************************/
@import url('https://fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,900');
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
article, header, section, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display: block;
}
body {
background: #ffffff none repeat scroll 0 0;
color: #222;
font-size: 100%;
line-height: 24px;
margin: 0;
padding:0;
font-family: "Raleway",sans-serif;
}
form{
width: 100%;
text-align: center;
}
a{
font-family: "Raleway",sans-serif;
text-decoration: none;
outline: none;
}
a:hover, a:focus {
color: #373e18;
}
section {
float: left;
width: 100%;
padding-bottom:3em;
}
h2 {
color: #1a0e0e;
font-size: 26px;
font-weight: 700;
margin: 0;
line-height: normal;
text-transform:uppercase;
}
h2 span {
display: block;
padding: 0;
font-size: 18px;
opacity: 0.7;
margin-top: 5px;
text-transform:uppercase;
}
#float-right{
float:right;
}
/* ******************************************************
Script Top
*********************************************************/
.ScriptTop {
background: #fff none repeat scroll 0 0;
float: left;
font-size: 0.69em;
font-weight: 600;
line-height: 2.2;
padding: 12px 0;
text-transform: uppercase;
width: 100%;
}
/* To Navigation Style 1*/
.ScriptTop ul {
margin: 24px 0;
padding: 0;
text-align: left;
}
.ScriptTop li{
list-style:none;
display:inline-block;
}
.ScriptTop li a {
background: #6a4aed none repeat scroll 0 0;
color: #fff;
display: inline-block;
font-size: 14px;
font-weight: 600;
padding: 5px 18px;
text-decoration: none;
text-transform: capitalize;
}
.ScriptTop li a:hover{
background:#000;
color:#fff;
}
/* ******************************************************
Script Header
*********************************************************/
.ScriptHeader {
float: left;
width: 100%;
padding: 2em 0;
}
.rt-heading {
margin: 0 auto;
text-align:center;
}
.Scriptcontent{
line-height:28px;
}
.ScriptHeader h1{
font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
color: #6a4aed;
font-size: 26px;
font-weight: 700;
margin: 0;
line-height: normal;
}
.ScriptHeader h2 {
color: #312c8f;
font-size: 20px;
font-weight: 400;
margin: 5px 0 0;
line-height: normal;
}
.ScriptHeader h1 span {
display: block;
padding: 0;
font-size: 22px;
opacity: 0.7;
margin-top: 5px;
}
.ScriptHeader span {
display: block;
padding: 0;
font-size: 22px;
opacity: 0.7;
margin-top: 5px;
}
/* ******************************************************
Live Demo
*********************************************************/
/* ******************************************************
Responsive Grids
*********************************************************/
.rt-container {
margin: 0 auto;
padding-left:12px;
padding-right:12px;
}
.rt-row:before, .rt-row:after {
display: table;
line-height: 0;
content: "";
}
.rt-row:after {
clear: both;
}
[class^="col-rt-"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
padding: 0 15px;
min-height: 1px;
position: relative;
}
@media (min-width: 768px) {
.rt-container {
width: 750px;
}
[class^="col-rt-"] {
float: left;
width: 49.9999999999%;
}
.col-rt-6, .col-rt-12 {
width: 100%;
}
}
@media (min-width: 1200px) {
.rt-container {
width: 1170px;
}
.col-rt-1 {
width:16.6%;
}
.col-rt-2 {
width:30.33%;
}
.col-rt-3 {
width:50%;
}
.col-rt-4 {
width: 67.664%;
}
.col-rt-5 {
width: 83.33%;
}
}
@media only screen and (min-width:240px) and (max-width: 768px){
.ScriptTop h1, .ScriptTop ul {
text-align: center;
}
.ScriptTop h1{
margin-top:0;
margin-bottom:15px;
}
.ScriptTop ul{
margin-top:12px;
}
.ScriptHeader h1,
.ScriptHeader h2,
.scriptnav ul{
text-align:center;
}
.scriptnav ul{
margin-top:12px;
}
#float-right{
float:none;
}
}
.feedback{
width: 100%;
max-width: 780px;
background: #fff;
margin: 0 auto;
padding: 15px;
box-shadow: 1px 1px 16px rgba(0, 0, 0, 0.3);
text-align: center
}
.feedback img{
text-align: center;
}
.survey-hr{
margin:10px 0;
border: .5px solid #ddd;
}
.star-rating {
margin: 25px 0 0px;
font-size: 0;
white-space: nowrap;
display: inline-block;
width: 175px;
height: 35px;
overflow: hidden;
position: relative;
background: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDIwIDIwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cG9seWdvbiBmaWxsPSIjREREREREIiBwb2ludHM9IjEwLDAgMTMuMDksNi41ODMgMjAsNy42MzkgMTUsMTIuNzY0IDE2LjE4LDIwIDEwLDE2LjU4MyAzLjgyLDIwIDUsMTIuNzY0IDAsNy42MzkgNi45MSw2LjU4MyAiLz48L3N2Zz4=');
background-size: contain;
}
.star-rating i {
opacity: 0;
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 20%;
z-index: 1;
background: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDIwIDIwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cG9seWdvbiBmaWxsPSIjRkZERjg4IiBwb2ludHM9IjEwLDAgMTMuMDksNi41ODMgMjAsNy42MzkgMTUsMTIuNzY0IDE2LjE4LDIwIDEwLDE2LjU4MyAzLjgyLDIwIDUsMTIuNzY0IDAsNy42MzkgNi45MSw2LjU4MyAiLz48L3N2Zz4=');
background-size: contain;
}
.star-rating input {
-moz-appearance: none;
-webkit-appearance: none;
opacity: 0;
display: inline-block;
width: 20%;
height: 100%;
margin: 0;
padding: 0;
z-index: 2;
position: relative;
}
.star-rating input:hover + i,
.star-rating input:checked + i {
opacity: 1;
}
.star-rating i ~ i {
width: 40%;
}
.star-rating i ~ i ~ i {
width: 60%;
}
.star-rating i ~ i ~ i ~ i {
width: 80%;
}
.star-rating i ~ i ~ i ~ i ~ i {
width: 100%;
}
.choice {
position: fixed;
top: 0;
left: 0;
right: 0;
text-align: center;
padding: 20px;
display: block;
}
span.scale-rating{
margin: 5px 0 15px;
display: flex;
justify-content: space-evenly;
width: 100%;
}
/*@media only screen and (min-width:720px) and (max-width: 1440px){*/
/* */
/*}*/
/*span.scale-rating>label {*/
/* outline: 0!important;*/
/* border: 1px solid #00000054;*/
/* height: 10%;*/
/* margin: 10px 0px 0 0px;*/
/* padding-left: 0px;*/
/* padding-bottom: 0px;*/
/* font-size: large;*/
/* font-weight: bolder;*/
/* text-align: center;*/
/* width: 3%;*/
/* border-radius: 50%;*/
/*}*/
@media only screen and (min-width:240px) and (max-width: 420px){
img{
text-align: center;
width: 100%;
}
span.scale-rating > label {
outline: 0!important;
border: 1px solid #00000054;
height: 5%;
margin: 1% 5px 0px 0px;
padding-left: 0px;
padding-bottom: 0px;
font-size: large;
font-weight: bolder;
text-align: center;
width: 10%;
border-radius: 60%;
}
}
@media only screen and (min-width:421px) and (max-width: 720px){
img{
text-align: center;
width: 100%;
}
span.scale-rating > label {
outline: 0!important;
border: 1px solid #00000054;
height: 5%;
margin: 1% 5px 0px 0px;
padding-left: 0px;
padding-bottom: 0px;
font-size: large;
font-weight: bolder;
text-align: center;
width: 5%;
border-radius: 60%;
}
}
@media screen and (min-width: 720px) and (max-width: 1080px) {
span.scale-rating{
margin: 5px 0 15px;
display: flex;
justify-content: space-evenly;
width: 100%;
}
span.scale-rating > label {
outline: 0!important;
border: 2px solid #00000054;
height: 10%;
margin: 5% 0px 0 0px;
padding-left: 0px;
padding-bottom: 0px;
font-size: large;
font-weight: bolder;
/*text-align: center;*/
width: 4%;
border-radius: 50%;
}
}
@media (min-width: 1081px) {
span.scale-rating{
margin: 5px 0 15px;
display: flex;
justify-content: space-between;
width: 100%;
}
span.scale-rating > label {
outline: 0!important;
border: 2px solid #00000054;
height: 10%;
margin: 5% 0px 0 0px;
padding-left: 0px;
padding-bottom: 0px;
font-size: large;
font-weight: bolder;
width: 4%;
border-radius: 50%;
}
}
/*span.scale-rating label {*/
/* position:relative;*/
/* -webkit-appearance: none;*/
/* outline:0 !important;*/
/* height:33px;*/
/* margin: 0 5px 0 0;*/
/* width: calc(10% - 7px);*/
/* float: left;*/
/* cursor:pointer;*/
/*}*/
/*a.scale-rating {*/
/* position:relative;*/
/* -webkit-appearance: none;*/
/* outline:0 !important;*/
/* border: 1px solid grey;*/
/* height:33px;*/
/* margin: 0 5px 0 0;*/
/* width: 100%;*/
/* cursor:pointer;*/
/*}*/
span.scale-rating input[type=radio] {
position:absolute;
-webkit-appearance: none;
opacity:0;
outline:0 !important;
/*border-right: 1px solid grey;*/
height:33px;
margin: 0 5px 0 0;
width: 100%;
float: left;
cursor:pointer;
z-index:3;
}
span.scale-rating label:hover{
background: #8dc1fd;
transform: scale(1.5);
}
span.scale-rating input[type=radio]:last-child{
border-right:0;
}
span.scale-rating label input[type=radio]:checked ~ label{
-webkit-appearance: none;
margin: 0;
background:#fddf8d;
}
span.scale-rating label:before
{
content:attr(value);
top: 7px;
width: 100%;
position: absolute;
left: 0;
right: 0;
text-align: center;
vertical-align: middle;
z-index:2;
}
</style>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
</title>
<meta name="author" content="Codeconvey" />
<!--<link rel="stylesheet" href="style.css">-->
<!--Only for demo purpose - no need to add.-->
<!--<link rel="stylesheet" href="demo.css" />-->
</head>
<body>
<div class="feedback">
<form action="#action-url" method="post">
<div class="clear">
</div>
<hr class="survey-hr" />
<img src="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-" />
<h4>How likely are you to recommend OX Tools UK to a friend or collegues?
</h4>
<hr class="survey-hr" />
<span class="scale-rating">
<label onclick="window.open("url=1")">
<!-- <input type="submit" value="1" onclick= window.open('url=1') />-->
<a href="url=1">1
</a>
<!--<!– <a href=>–>-->
<!-- -->
<!--<!– <input type="radio" name="rating" onclick= window.open('url=1') >–>-->
<!--<!– <label style="width:100%;"></label>–>-->
<!-- <!– </a>–>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&id=<--id–>&response=2&date=<--date–>">-->
<label>
<!-- <input type="radio" name="rating" onclick= window.open('url=2') >-->
<!-- <label style="width:100%;"></label>-->
<a href="url=2">2
</a>
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=3">3
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=3') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=4">4
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=4') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=5">5
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=5') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=6">6
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=6') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=7">7
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=7') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=8">8
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=8') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=9">9
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=9') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- </a>-->
<!-- <a href="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<label>
<a href="url=10">10
</a>
<!-- <input type="radio" name="rating" onclick= window.open('url=10') >-->
<!-- <label style="width:100%;"></label>-->
</label>
<!-- <label value="1">-->
<!-- <input type="radio" name="rating" >-->
<!-- <label style="width:100%;"></label>-->
<!-- </label>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=1">1</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=2&date=Cdate">2</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=3&date=Cdate">3</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=4&date=Cdate">4</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=5&date=Cdate">5</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=6&date=Cdate">6</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=7&date=Cdate">7</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=8&date=Cdate">8</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=9&date=Cdate">9</a>-->
<!-- <a href="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&id=Cid&response=10&date=Cdate">10</a>-->
<!-- </a>-->
</span>
<br />
<span>
<strong>
<span style="float: left">1- Not likely
</span>
</strong>
<strong>
<span style="float: right">10- Very likely
</span>
</strong>
</span>
<span>
</span>
</form>
<!-- Analytics -->
</div>
</body>
</html>
// feedback.html
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<style>
/* ******************************************************
Author URI: https://codeconvey.com/
Demo Purpose Only - May not require to add.
font-family: "Raleway",sans-serif;
*********************************************************/
@import url('https://fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,900');
html {
box-sizing: border-box;
}
table {
width: 100%;
}
*, *:before, *:after {
box-sizing: inherit;
}
article, header, section, aside, details, figcaption, figure, footer, header, hgroup, main, nav, summary {
display: block;
}
body {
background: rgb(255, 255, 255) none repeat scroll 0 0;
color: #222;
font-size: 100%;
line-height: 24px;
margin: 0;
padding: 0;
font-family: "Raleway", sans-serif;
text-align: center;
width: 100%;
}
a {
font-family: "Raleway", sans-serif;
text-decoration: none;
outline: none;
}
a:hover, a:focus {
color: #373e18;
}
section {
float: left;
width: 100%;
padding-bottom: 3em;
background: #ffffff;
}
h2 {
color: #1a0e0e;
font-size: 26px;
font-weight: 700;
margin: 0;
line-height: normal;
text-transform: uppercase;
}
h2 span {
display: block;
padding: 0;
font-size: 18px;
opacity: 0.7;
margin-top: 5px;
text-transform: uppercase;
}
#float-right {
float: right;
}
/* ******************************************************
Script Top
*********************************************************/
.ScriptTop {
background: #fff none repeat scroll 0 0;
float: left;
font-size: 0.69em;
font-weight: 600;
line-height: 2.2;
padding: 12px 0;
text-transform: uppercase;
width: 100%;
}
/* To Navigation Style 1*/
.ScriptTop ul {
margin: 24px 0;
padding: 0;
text-align: left;
}
.ScriptTop li {
list-style: none;
display: inline-block;
}
.ScriptTop li a {
background: #6a4aed none repeat scroll 0 0;
color: #fff;
display: inline-block;
font-size: 14px;
font-weight: 600;
padding: 5px 18px;
text-decoration: none;
text-transform: capitalize;
}
.ScriptTop li a:hover {
background: #000;
color: #fff;
}
/* ******************************************************
Script Header
*********************************************************/
.ScriptHeader {
float: left;
width: 100%;
padding: 2em 0;
}
.rt-heading {
margin: 0 auto;
text-align: center;
}
.Scriptcontent {
line-height: 30px;
}
.ScriptHeader h1 {
font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
color: #6a4aed;
font-size: 26px;
font-weight: 700;
margin: 0;
line-height: normal;
}
.ScriptHeader h2 {
color: #312c8f;
font-size: 20px;
font-weight: 400;
margin: 5px 0 0;
line-height: normal;
}
.ScriptHeader h1 span {
display: block;
padding: 0;
font-size: 22px;
opacity: 0.7;
margin-top: 5px;
}
.ScriptHeader span {
display: block;
padding: 0;
font-size: 22px;
opacity: 0.7;
margin-top: 5px;
}
/* ******************************************************
Live Demo
*********************************************************/
/* ******************************************************
Responsive Grids
*********************************************************/
.rt-container {
margin: 0 auto;
padding-left: 12px;
padding-right: 12px;
}
.rt-row:before, .rt-row:after {
display: table;
line-height: 0;
content: "";
}
.rt-row:after {
clear: both;
}
[class^="col-rt-"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
padding: 0 15px;
min-height: 1px;
position: relative;
}
@media (min-width: 768px) {
.rt-container {
width: 750px;
}
[class^="col-rt-"] {
float: left;
width: 49.9999999999%;
}
.col-rt-6, .col-rt-12 {
width: 100%;
}
}
@media (min-width: 1200px) {
.rt-container {
width: 100%;
/*margin-left: 50%;*/
}
textarea {
width: 100%;
}
.col-rt-1 {
width: 16.6%;
}
.col-rt-2 {
width: 30.33%;
}
.col-rt-3 {
width: 50%;
}
.col-rt-4 {
width: 67.664%;
}
.col-rt-5 {
width: 83.33%;
}
}
@media only screen and (min-width: 240px) and (max-width: 360px) {
.rt-container {
width: 100%;
}
textarea {
width: 100%;
}
}
@media only screen and (min-width: 361px) and (max-width: 720px) {
textarea {
width: 90%;
}
}
@media only screen and (min-width: 240px) and (max-width: 1440px) {
.rt-container {
width: 100%;
}
.ScriptTop h1, .ScriptTop ul {
text-align: center;
}
.ScriptTop h1 {
margin-top: 0;
margin-bottom: 15px;
}
.ScriptTop ul {
margin-top: 12px;
}
.ScriptHeader h1,
.ScriptHeader h2,
.scriptnav ul {
text-align: center;
}
.scriptnav ul {
margin-top: 12px;
}
#float-right {
float: none;
}
}
@media only screen and (min-width: 721px) and (max-width: 1024px) {
textarea {
width: 75%;
}
}
@media only screen and (min-width: 1025px) and (max-width: 1440px) {
textarea {
width: 50%;
}
}
@media only screen and (min-width: 1441px) and (max-width: 1800px) {
textarea {
width: 40%;
}
}
@media only screen and (min-width: 1801px) and (max-width: 2440px) {
textarea {
width: 30%;
}
}
@media (min-width: 2441px) {
textarea {
width: 25%;
}
}
.feedback {
width: 100%;
max-width: 780px;
background: #fff;
margin: 0 auto;
padding: 15px;
box-shadow: 1px 1px 16px rgba(0, 0, 0, 0.3);
}
.survey-hr {
margin: 10px 0;
border: .5px solid #ddd;
}
span.scale-rating {
margin: 5px 0 15px;
display: inline-block;
width: 100%;
}
span.scale-rating > label {
position: relative;
-webkit-appearance: none;
outline: 0 !important;
border: 1px solid grey;
border-radius: 75%;
height: 33px;
margin: 0 5px 0 0;
width: calc(10% - 7px);
float: left;
cursor: pointer;
}
span.scale-rating label {
position: relative;
-webkit-appearance: none;
outline: 0 !important;
height: 40px;
margin: 0 5px 0 0;
width: calc(10% - 7px);
float: left;
cursor: pointer;
}
span.scale-rating input[type=radio] {
position: absolute;
-webkit-appearance: none;
opacity: 0;
outline: 0 !important;
/*border-right: 1px solid grey;*/
height: 33px;
margin: 0 5px 0 0;
width: 100%;
float: left;
cursor: pointer;
z-index: 3;
}
span.scale-rating label:hover {
background: #00B4F5F9;
}
span.scale-rating input[type=radio]:last-child {
border-right: 0;
}
span.scale-rating label input[type=radio]:checked ~ label {
-webkit-appearance: none;
margin: 0;
background: transparent;
}
span.scale-rating label:before {
content: attr(value);
top: 7px;
width: 100%;
position: absolute;
left: 0;
right: 0;
text-align: center;
vertical-align: middle;
z-index: 2;
}
label {
font-size: large;
}
@media only screen and (min-width: 240px) and (max-width: 360px) {
input[type=submit] {
text-align: center;
margin-right: 0%;
}
}
@media only screen and (min-width: 361px) and (max-width: 720px) {
input[type=submit] {
text-align: center;
margin-right: 5%;
}
}
@media only screen and (min-width: 721px) and (max-width: 1024px) {
input[type=submit] {
text-align: center;
margin-right: 12%;
}
}
@media only screen and (min-width: 1025px) and (max-width: 1440px) {
input[type=submit] {
text-align: center;
margin-right: 25%;
}
}
@media only screen and (min-width: 1441px) and (max-width: 1800px) {
input[type=submit] {
text-align: center;
margin-right: 30%;
}
}
@media only screen and (min-width: 1801px) and (max-width: 2440px) {
input[type=submit] {
text-align: center;
margin-right: 35%;
}
}
@media (min-width: 2441px) {
input[type=submit] {
text-align: center;
margin-right: 37%;
}
}
</style>
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Feedback Form in HTML Example </title>
<meta name="author" content="Codeconvey"/>
<link rel="stylesheet" href="css/style.css">
<!--Only for demo purpose - no need to add.-->
<link rel="stylesheet" href="css/demo.css"/>
</head>
<body>
<!--<div class="ScriptTop">
<div class="rt-container">
<div class="col-rt-4" id="float-right">
</div>
<div class="col-rt-2">
</div>
</div>
</div>-->
<!--<img src="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">-->
<section>
<div class="rt-container">
<!-- <div class="col-rt-2">-->
<form method="post" action="https://3425005-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=3266&deploy=1&compid=3425005_SB1&h=2f595fd4c600e9b36adb&mode=2">
<img src="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">
<div class="Scriptcontent">
<label id="test"><b class="thanks">Thank you for your Feedback.</b> <br/>
<br/>Are there any comments you would like to share relating to your feedback?
</label><br/><br/>
<!-- <textarea cols="75" id="custpage_feedback_area" name="commentText" rows="5" style="100%"></textarea><br>-->
<textarea id="custpage_feedback_area" name="commentText" cols="75" rows="10" style="100%"></textarea>
<br>
<div class="clear"></div>
<input style="background:#009ff5;color:#fff;padding:12px;border:0;margin-top:5%; float: right; cursor: pointer"
type="submit" value="Submit your review">
</div>
</form>
</div>
</section>
<script>
// var form = document.querySelector('form');
// console.log("form", form);
// form.addEventListener('submit',event=>{
// event.preventDefault()
// });
// var feedback = form.querySelector('#custpage_feedback_area');
// console.log("feedback", feedback);
// console.log("feedback: ",feedback.value)
// function btnClick() {
//
// }
</script>
<!-- Analytics -->
</body>
</html>
//thanks.html
<!DOCTYPE html>
<html lang="en">
<style>
/* ******************************************************
Author URI: https://codeconvey.com/
Demo Purpose Only - May not require to add.
font-family: "Raleway",sans-serif;
*********************************************************/
@import url('https://fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,900');
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
article, header, section, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display: block;
}
body {
background: #ffffff none repeat scroll 0 0;
color: #222;
font-size: 100%;
line-height: 24px;
margin: 0;
padding:0;
font-family: "Raleway",sans-serif;
}
a{
font-family: "Raleway",sans-serif;
text-decoration: none;
outline: none;
}
a:hover, a:focus {
color: #373e18;
}
section {
/*float: left;*/
width: 100%;
padding-bottom:3em;
text-align: center;
}
h2 {
color: #1a0e0e;
font-size: 26px;
font-weight: 700;
margin: 0;
line-height: normal;
text-transform:uppercase;
}
h2 span {
display: block;
padding: 0;
font-size: 18px;
opacity: 0.7;
margin-top: 5px;
text-transform:uppercase;
}
#float-right{
float:right;
}
/* ******************************************************
Script Top
*********************************************************/
.ScriptTop {
background: #fff none repeat scroll 0 0;
float: left;
font-size: 0.69em;
font-weight: 600;
line-height: 2.2;
padding: 12px 0;
text-transform: uppercase;
width: 100%;
}
/* To Navigation Style 1*/
.ScriptTop ul {
margin: 24px 0;
padding: 0;
text-align: left;
}
.ScriptTop li{
list-style:none;
display:inline-block;
}
.ScriptTop li a {
background: #6a4aed none repeat scroll 0 0;
color: #fff;
display: inline-block;
font-size: 14px;
font-weight: 600;
padding: 5px 18px;
text-decoration: none;
text-transform: capitalize;
}
.ScriptTop li a:hover{
background:#000;
color:#fff;
}
/* ******************************************************
Script Header
*********************************************************/
.ScriptHeader {
float: left;
width: 100%;
padding: 2em 0;
}
.rt-heading {
margin: 0 auto;
text-align:center;
}
.Scriptcontent{
line-height: 30px;
/*width: max-content;*/
}
.ScriptHeader h1{
font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
color: #6a4aed;
font-size: 26px;
font-weight: 700;
margin: 0;
line-height: normal;
}
.ScriptHeader h2 {
color: #312c8f;
font-size: 20px;
font-weight: 400;
margin: 5px 0 0;
line-height: normal;
}
.ScriptHeader h1 span {
display: block;
padding: 0;
font-size: 22px;
opacity: 0.7;
margin-top: 5px;
}
.ScriptHeader span {
display: block;
padding: 0;
font-size: 22px;
opacity: 0.7;
margin-top: 5px;
}
/* ******************************************************
Live Demo
*********************************************************/
/* ******************************************************
Responsive Grids
*********************************************************/
.rt-container {
margin: 0 auto;
padding-left:12px;
padding-right:12px;
}
.rt-row:before, .rt-row:after {
display: table;
line-height: 0;
content: "";
}
.rt-row:after {
clear: both;
}
[class^="col-rt-"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
padding: 0 15px;
min-height: 1px;
position: relative;
}
@media (min-width: 768px) {
.rt-container {
width: 750px;
}
[class^="col-rt-"] {
float: left;
width: 49.9999999999%;
}
.col-rt-6, .col-rt-12 {
width: 100%;
}
}
@media (min-width: 1200px) {
.rt-container {
width: 1170px;
}
.col-rt-1 {
width:16.6%;
}
.col-rt-2 {
width:30.33%;
}
.col-rt-3 {
width:50%;
}
.col-rt-4 {
width: 67.664%;
}
.col-rt-5 {
width: 83.33%;
}
}
@media only screen and (min-width:240px) and (max-width: 768px){
.ScriptTop h1, .ScriptTop ul {
text-align: center;
}
.ScriptTop h1{
margin-top:0;
margin-bottom:15px;
}
.ScriptTop ul{
margin-top:12px;
}
.ScriptHeader h1,
.ScriptHeader h2,
.scriptnav ul{
text-align:center;
}
.scriptnav ul{
margin-top:12px;
}
#float-right{
float:none;
}
}
.feedback{
width: 100%;
max-width: 780px;
background: #fff;
margin: 0 auto;
padding: 15px;
box-shadow: 1px 1px 16px rgba(0, 0, 0, 0.3);
}
.survey-hr{
margin:10px 0;
border: .5px solid #ddd;
}
span.scale-rating{
margin: 5px 0 15px;
display: inline-block;
width: 100%;
}
span.scale-rating>label {
position:relative;
-webkit-appearance: none;
outline:0 !important;
border: 1px solid grey;
border-radius: 75%;
height:33px;
margin: 0 5px 0 0;
width: calc(10% - 7px);
float: left;
cursor:pointer;
}
span.scale-rating label {
position:relative;
-webkit-appearance: none;
outline:0 !important;
height:40px;
margin: 0 5px 0 0;
width: calc(10% - 7px);
float: left;
cursor:pointer;
}
span.scale-rating input[type=radio] {
position:absolute;
-webkit-appearance: none;
opacity:0;
outline:0 !important;
/*border-right: 1px solid grey;*/
height:33px;
margin: 0 5px 0 0;
width: 100%;
float: left;
cursor:pointer;
z-index:3;
}
span.scale-rating label:hover{
background: #00B4F5F9;
}
span.scale-rating input[type=radio]:last-child{
border-right:0;
}
span.scale-rating label input[type=radio]:checked ~ label{
-webkit-appearance: none;
margin: 0;
background: transparent;
}
span.scale-rating label:before
{
content:attr(value);
top: 7px;
width: 100%;
position: absolute;
left: 0;
right: 0;
text-align: center;
vertical-align: middle;
z-index:2;
}
@media only screen and (min-width:240px) and (max-width: 430px){
.Scriptcontent{
line-height: 30px;
width: max-content;
}
input[type=submit]{
text-align: center;
}
}
@media only screen and (min-width:431px) and (max-width: 720px){
.Scriptcontent{
line-height: 30px;
}
input[type=submit]{
text-align: center;
}
}
@media only screen and (min-width:721px) and (max-width: 1024px){
.Scriptcontent{
line-height: 30px;
}
input[type=submit]{
text-align: center;
}
}
@media only screen and (min-width:1025px) and (max-width: 1440px){
.Scriptcontent{
line-height: 30px;
}
input[type=submit]{
text-align: center;
}
}
@media only screen and (min-width:1441px) and (max-width: 1800px){
.Scriptcontent{
line-height: 30px;
}
input[type=submit]{
text-align: center;
}
}
@media only screen and (min-width:1801px) and (max-width: 2440px){
.Scriptcontent{
line-height: 30px;
}
input[type=submit]{
text-align: center;
}
}
@media (min-width: 2441px) {
.Scriptcontent{
line-height: 30px;
}
input[type=submit]{
text-align: center;
}
}
</style>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Feedback Form in HTML Example </title>
<meta name="author" content="Codeconvey" />
<link rel="stylesheet" href="css/style.css">
<!--Only for demo purpose - no need to add.-->
<link rel="stylesheet" href="css/demo.css" />
</head>
<body>
<div class="ScriptTop">
<div class="rt-container">
<div class="col-rt-4" id="float-right">
</div>
<div class="col-rt-2">
</div>
</div>
</div>
<section>
<div class="rt-container">
<div class="col-rt-12">
<img src="https://3425005-sb1.app.netsuite.com/core/media/media.nl?id=44&c=3425005_SB1&h=t86CsY4XXYGWFLOTBt8TFKvhG2OJ1a586X_ntljL924nOnQ-">
<div class="Scriptcontent">
<h1 style="text-align: center">Thank you for your valuable time</h1><br/><br/>
<!-- <input style="background:#009ff5;color:#fff;padding:12px;border:0; cursor:pointer; alignment-baseline: center" type="submit" onclick=window.close() value="Close Tab"> -->
</div>
</div>
</div>
</div>
</section>
<!-- Analytics -->
</body>
</html>
The page looks like below


