Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show survey's title on SurveyMobile.aspx (via cs code) #117

Open
ia5634 opened this issue May 9, 2020 · 1 comment
Open

Show survey's title on SurveyMobile.aspx (via cs code) #117

ia5634 opened this issue May 9, 2020 · 1 comment

Comments

@ia5634
Copy link

ia5634 commented May 9, 2020

2. NEW FEATURE

a. User story
As a survey degisner I want to show survey's title on Surveymobile.aspx page

So I made some changes on SurveyMobile.aspx.cs (and .aspx of course, just change to "CodeFile = SurveyMobile.aspx.cs")

b. Acceptance Criteria
These are what I added;

Added this after (copied from customresults page) "void Page_Load(Object sender, EventArgs e)"

private string GetSurveyTitle()
        {
            int id = GetSurveyId();
            SurveyData surveyData = new Surveys().GetSurveyById(id, "");
            string _surveyTitle = surveyData.Surveys[0].Title;

            return _surveyTitle;
        }

And added this to after "SurveyLayoutData _userSettings;"
Page.Title = GetSurveyTitle();

All is yours, didn't add any bit :)

This way designers can show the title easily. Maybe a question can be added to ask "Do you want to show title on page" or a field for title asked via "type here whatever you want to be shown as title".

@ia5634
Copy link
Author

ia5634 commented May 9, 2020

Did this already. Works...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants