0 votes
in SoSci Survey (English) by s152546 (190 points)

Hi
How can I change the text displayed in the InfoBox?
I created an InfoBox with additional information (PHP code: $link = textlink('infoBox', 'aici', 640, 400); html('<p>Informații suplimentare '.$link.'</p>');); but after changing the text, when I press the button, the old text is displayed.

1 Answer

0 votes
by SoSci Survey (306k points)

Please make sure that the content of "infoBox" has been changed and that you have save the changes with the save button.

If the browser still displays the old content, this may be a browser caching issue. Try and press F5 (reload page) on the pop up.

by s152546 (190 points)
I tried, but do not work. I tried also to make a second info Box (2), the feed-back is: The text your looking for has not been found in this project.
by SoSci Survey (306k points)
Where exactly did you create the first and second text? In the "Labels and Text Elements" menu or in a section? If the ID is "infoBox" you should look in the former. If you created the text in the latter, then you will have a 4-character ID such as AB01.
by s152546 (190 points)
I worked with Labels and Text Elements
and I changed there
and now give other error:There is an error in the PHP code:

Questionnaire Error: Command or string (text) unfinished

    A command, e.g. question() is missing a semicolon or
    a string (text in quotation marks) is unclosed or
    the string itself contains an apostrophe, e.g. html('Let's do it!'); – if the latter is the case, please type in a backslash (\) first.
    Perhaps the opening and closing braces for the statement blocks are mismatched.

PHP code

001 namespace s2survey\questionnaire\environment;
002
003 $link = textlink('InfoBox', 'aici');
004 html('<p>Informatii suplimentare'.$link.'</p>').
005 return 'ok';
by s152546 (190 points)
Is it possible that the error occurs because I also have an agreement button on the page?
by s152546 (190 points)
I set the info box for the first time in the project settings but now the link no longer displays it.
Later I created it in the section, but it doesn't display it either.
by SoSci Survey (306k points)
> I set the info box for the first time in the project settings

I believe that you do not actually mean the "Survey Projekt" -> "Project Settings" menu item, do you?

There are two locations where to define texts: The "Labels and Text Elements" and the list of questions within any section. If the text has a name (no ID) then it was probably defined in the former.

> Is it possible that the error occurs because I also have an agreement button on the page?

No, this is very unlikely.

> Questionnaire Error: Command or string (text) unfinished

You have got a dot (.) behind the html() command, not a semicolon (;).
by s152546 (190 points)
Since I couldn't find another option, I will use an HTLM code (although I would have preferred that the additional information to open in a new pop-up window...)
by SoSci Survey (306k points)
The pop-up should work fine if you replaced the dot/semicolon?! If not, you're welcome to post your code and explain what is not (yet) working.
by s152546 (190 points)
Unfortunately doesn't want to display correctly.
No additional information is displayed in the InfoBox either if I try on the test version of the questionnaire or if I access the link in Project Setting.
I really don't understand where I'm wrong
In both cases it is displayed:
This page isn’t workingwww.soscisurvey.de is currently unable to handle this request.
HTTP ERROR 500

PHP code used:
$link = textlink('InfoBox', 'aici', 640, 400);
html('<p>Informații suplimentare '.$link.'</p>');

InfoBox vas created in Labels and Text Element

the hiperlink:
https://www.soscisurvey.de/partea1/?info
by SoSci Survey (306k points)
No, we're getting somewhere : )Thank you, at least regarding the "?info" page I was able to identify a program bug and resolve that. Let's continue with the textlink().
by s152546 (190 points)
Thank you very much. Now it works perfectly.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...