The package is made with the exact folder structure (that are only required) as that of sites.
- Download the repo into you local by clicking
Download as zipunderCodebutton. - Unzip the folder. and proceed
- replace
package.jsonon sites withpackage.jsonfile. Commit and restart.
- Under Static -> js -> Create a folder named
survey.
- Upload
landing.jsonandsurvey.jsonfromconfigto site'sconfigfolder. - Upload
landing.html.hbsandsurvey.html.hjbsfrompagesto site'spagesfolder. - Upload all the images from
static -> assets -> imagesto site'sstatic -> assets -> imagesfolder. - Upload all the files from
static -> js -> surveyto site'sstatic -> js -> surveyfolder. (Folder created in Step 1) - Upload
survey.scssfromstatic -> scsstostatic -> scssfolder in sites.
config -> global_config.jsonon sites withconfig -> global_config.jsonfile.themes -> answers-hitchhiker-theme -> static -> webpack -> webpack.prod.json sites withthemes -> answers-hitchhiker-theme -> static -> webpack -> webpack.prod.jsfile.webpack-config.json sites withwebpack-config.jsfile.
- Add
@import "survey.scss";as the first line toanswers.scss. - Add the below code anywhere not inside
.Answersand.overlayblocks.
.Survey .Question-option.is-selected {
background-color: lightgrey; // Clicked element background color
}
.yxt-SearchBar-AnimatedIcon.yxt-SearchBar-AnimatedIcon--paused.js-yxt-AnimatedForward.component.yxt-Answers-component {
display: none !important;
}
.yxt-SearchBar-AnimatedIcon.js-yxt-AnimatedForward.component.yxt-Answers-component.yxt-SearchBar-AnimatedIcon--inactive,
.yxt-SearchBar-AnimatedIcon.js-yxt-AnimatedReverse.component.yxt-Answers-component.yxt-SearchBar-AnimatedIcon--inactive{
display: none !important;
}
.yxt-SearchBar-AnimatedIcon.yxt-SearchBar-AnimatedIcon--paused.js-yxt-AnimatedReverse.yxt-SearchBar-AnimatedIcon--inactive.component.yxt-Answers-component
{
display: flex !important;
}
Add the below stylings to the answer-variables.scss inside :root
// Survey styling variables
// this color is used for buttons, and other highlights throughout the survey
--yxt-survey-color-primary: var(--yxt-color-brand-primary);
// this color is used for text on buttons
--yxt-survey-color-button-text: white;
// this color is used for the 'skip question' text link
--yxt-survey-color-skip-text: black;
// these two colors power the progress bar colors
--yxt-survey-color-progress-bar-empty: #d3d3d3;
--yxt-survey-color-progress-bar-full: var(--yxt-color-brand-primary);
// this property is used for box shadows on buttons and options
--yxt-survey-box-shadow: 0px 8px 23px 0px rgba(0,0,0,0.66);
From your answers experience update
- apiKey - append your key to
sandbox- - businessId
- experienceKey
- Replace
title,subtitle,imageandtextwith contents of your choice. - In the repo,
imageis commented. If needed un-comment this piece (Line 10).
- Replace the default
Question *andOption *placeholders with the action questions and options. - Replace
/static/assets/images/img.pngwith the Image that will be used. - Replace
verticalvalue with the page where the user should be navigated at the end of survey. - Replace
queryBasewith a initial term used to start the query. - Replace
formatwith the intented Query format.
Commit - Restart Live preview.
