Drag and Drop Functions


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K

(1) Sorry, the screenshot is not visible. Please attach it properly.
Fixed, thank you.
(2) Please don't paste entire scripts into a post's body. Instead attach the script file. The code you pasted is still incomplete. It cannot be run. Please provide runnable code, i.e. make sure everything needed is included.
(3) If the code requires external files to run, as this one does, provide those files along with the script, please.
(4) If the study is already up somewhere online, provide the link to the study's start page.
Edited 4 Years Ago by Dave
raynae
raynae
Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)
Group: Forum Members
Posts: 13, Visits: 53
sorry here is a photo
Attachments
raynae
raynae
Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)
Group: Forum Members
Posts: 13, Visits: 53
As I mentioned the item spacing doesn't follow the code I've written. The items appear overlapped when viewed on a mobile device. I've included the entire code but as I've mentioned the specific problem is when you try to view it on a mobile device. 
<survey scales>
/pages = [1= surveyintro; 2= frequency1; 3= frequency2; 4= attitude1; 5= iden; 6=demogintro; 7= end]
/ onblockbegin = [if (radiobuttons.select.response == "1") values.select = 1]
/ onblockbegin = [if (radiobuttons.select.response == "2") values.select = 2]
/ onblockbegin = [
    if (values.select == "1") radiobuttons.freq1.caption = "Looked for ways to reuse things";
    if (values.select == "2") radiobuttons.freq1.caption = "Cercato modi per riutilizzare le cose";
    if (values.select == "1") radiobuttons.freq2.caption = "Encouraged friends or family to recycle";
    if (values.select == "2") radiobuttons.freq2.caption = "Incoraggiato gli amici o la famiglia a fare la raccolta differenziata";
    if (values.select == "1") radiobuttons.freq3.caption = "Purchased products in reusable containers";
    if (values.select == "2") radiobuttons.freq3.caption = "Acquistato prodotti in confezioni riciclabili";
    if (values.select == "1") radiobuttons.freq4.caption = "Picked up litter that was not your own ";
    if (values.select == "2") radiobuttons.freq4.caption = "Raccolto i rifiuti altrui trovati per terra";
    if (values.select == "1") radiobuttons.freq5.caption = "Composted food scraps";
    if (values.select == "2") radiobuttons.freq5.caption = "Compostato i rifiuti organici (per il giardino)";
    if (values.select == "1") radiobuttons.freq6.caption = "Conserved gasoline by walking or bicycling";
    if (values.select == "2") radiobuttons.freq6.caption = "Evitato il consumo di benzina camminando o andando in bicicletta";
    if (values.select == "1") radiobuttons.freq7.caption = "Voted for a candidate who supported environmental issue";
    if (values.select == "2") radiobuttons.freq7.caption = "Votato per un candidato politico che supportava le questioni ambientali";
    if (values.select == "1") radiobuttons.freq8.caption = "Made an effort to conserve resources in your home, such as electricity, natural gas, and water for environmental reasons";
    if (values.select == "2") radiobuttons.freq8.caption = "Fatto lo sforzo di non sprecare risorse domestiche, come elettricità, gas, acqua, per motivi ambiental";
    if (values.select == "1") radiobuttons.freq9.caption = "Intentionally avoided the use of disposable paper or plastic products for environmental reasons";
    if (values.select == "2") radiobuttons.freq9.caption = "Evitato intenzionalmente l’uso di carta usa e getta o prodotti di plastica, per motivi ambientali";
    if (values.select == "1") radiobuttons.freq10.caption = "Intentionally avoided products with necessary packaging, for environmental reasons";
    if (values.select == "2") radiobuttons.freq10.caption = "Evitato intenzionalmente di comprare prodotti imballati, per motivi ambientali";
    if (values.select == "1") radiobuttons.freq11.caption = "Intentionally purchased products manufactured or grown in an environmentally friendly manner";
    if (values.select == "2") radiobuttons.freq11.caption = "Acquistato intenzionalmente prodotti fabbricati o coltivati nel rispetto dell’ambiente";
    if (values.select == "1") radiobuttons.freq12.caption = "Recycled newspapers";
    if (values.select == "2") radiobuttons.freq12.caption = "Fatto la raccolta differenziata di giornali ";
    if (values.select == "1") radiobuttons.freq13.caption = "Recycled cans or metal";
    if (values.select == "2") radiobuttons.freq13.caption = "Fatto la raccolta differenziata di lattine o mettalo";
    if (values.select == "1") radiobuttons.freq14.caption = "Recycled glass";
    if (values.select == "2") radiobuttons.freq14.caption = "Fatto la raccolta differenziata di vetro";
    if (values.select == "1") radiobuttons.freq15.caption = "Recycled plastic";
    if (values.select == "2") radiobuttons.freq15.caption = "Fatto la raccolta differenziata di plastica";
    if (values.select == "1") radiobuttons.freq16.caption = "Recycled food waste";
    if (values.select == "2") radiobuttons.freq16.caption = "Fatto la raccolta differenziata di rifiuti organici";
    if (values.select == "1") radiobuttons.freq17.caption = "Returned old medicines to pharmacies";
    if (values.select == "2") radiobuttons.freq17.caption = "Restituito i medicinali scaduti in farmacia";
    if (values.select == "1") radiobuttons.freq18.caption = "Brought old frying oil to supermarkets and recycling sites";
    if (values.select == "2") radiobuttons.freq18.caption = "Portato ai supermercati o ai siti di raccolta l’olio di frittura usato";
    if (values.select == "1") radiobuttons.freq19.caption = "Donated clothes to charities or brought to recycling sites";
    if (values.select == "2") radiobuttons.freq19.caption = "Donato vestiti usati a enti di beneficienza o li ho portati nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq20.caption = "Gifted old clothing to friends, love-ones or neighbours";
    if (values.select == "2") radiobuttons.freq20.caption = "Regalato vestiti usati ad amici, cari o vicini";
    if (values.select == "1") radiobuttons.freq21.caption = "Reused or repurposed items before disposing/recycling them";
    if (values.select == "2") radiobuttons.freq21.caption = "Riutilizzato più volte gli oggetti (anche con scopi diversi) prima di smaltirli/riciclarli";
    if (values.select == "1") radiobuttons.freq22.caption = "Brought corks to specific recycling points";
    if (values.select == "2") radiobuttons.freq22.caption = "Portato i tappi di bottiglie (plastica o sughero) negli appositi siti di raccolta";
    if (values.select == "1") radiobuttons.freq23.caption = "Brought paint to recycling sites";
    if (values.select == "2") radiobuttons.freq23.caption = "Portato i barratoli di vernice usati nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq24.caption = "Returned an old smartphone and/or other small electronic devices to shops";
    if (values.select == "2") radiobuttons.freq24.caption = "Restituito in negozio un vecchio smartphone e/o altri piccoli dispositivi elettronici";
    if (values.select == "1") radiobuttons.freq25.caption = "Brought garden waste to recycling sites";
    if (values.select == "2") radiobuttons.freq25.caption = "Portato gli scarti vegetali (per es., giardinaggio) nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq26.caption = "Arranged for household furniture or large household waste (e.g., a broken door) to be brought to appropriate recycling sites";
    if (values.select == "2") radiobuttons.freq26.caption = "Predisposto il trasporto di mobili o vecchi articoli domestici di grandi dimensioni (per es., una porta rotta) negli specifici siti di raccolta";
    if (values.select == "1") radiobuttons.freq27.caption = "Gifted or sold old furniture to others";
    if (values.select == "2") radiobuttons.freq27.caption = "Regalato o venduto vecchi mobili ad altri";
    if (values.select == "1") radiobuttons.freq28.caption = "Brought spent lightbulbs to dedicated recycling sites";
    if (values.select == "2") radiobuttons.freq28.caption = "Portato le lampadine fulminate negli appositi siti di raccolta";
    if (values.select == "1") radiobuttons.freq29.caption = "Brought batteries to supermarkets and recycling sites";
    if (values.select == "2") radiobuttons.freq29.caption = "Portato le batterie scariche ai supermercati e nei siti di raccolta";
    
    if (values.select == "1") radiobuttons.att1.caption = "Recycling is important";
    if (values.select == "2") radiobuttons.att1.caption = "La raccolta differenziata è importante";
    if (values.select == "1") radiobuttons.att2.caption = "Each consumer can contribute to the solution of the litter problem in his/her region";
    if (values.select == "2") radiobuttons.att2.caption = "Ogni consumatore può contribuire alla soluzione del problema dei rifiuti nella propria regione";
    if (values.select == "1") radiobuttons.att3.caption = "Recycling benefits are worth-while my time and effort";
    if (values.select == "2") radiobuttons.att3.caption = "I benefici della raccolta differenziata valgono il mio tempo e i miei sforzi";
    if (values.select == "1") radiobuttons.att4.caption = "Recycling helps with natural resources conservation";
    if (values.select == "2") radiobuttons.att4.caption = "La raccolta differenziata contribuisce alla conservazione delle risorse naturali";
    if (values.select == "1") radiobuttons.att5r.caption = "It is rather inconvenient to sort out and transport recycling materials";
    if (values.select == "2") radiobuttons.att5r.caption = "È piuttosto sconveniente smistare e trasportare i rifiuti da riciclare";
    if (values.select == "1") radiobuttons.att6.caption = "The government should issue regulations about the use of recycled and recyclable materials in packaging materials";
    if (values.select == "2") radiobuttons.att6.caption = "Il governo dovrebbe regolamentare l'uso di materiali riciclati e riciclabili negli imballaggi";
    if (values.select == "1") radiobuttons.att7.caption = "Consumers should force the producers to use recyclable materials in their packaging materials";
    if (values.select == "2") radiobuttons.att7.caption = "I consumatori dovrebbero obbligare i produttori a utilizzare materiali riciclabili negli imballaggi";
    if (values.select == "1") radiobuttons.att8.caption = "It is my personal responsibility to help recycling efforts";
    if (values.select == "2") radiobuttons.att8.caption = "È mia responsabilità personale contribuire agli sforzi per la raccolta differenziata";
    if (values.select == "1") radiobuttons.att9.caption = "Recycling is a great help to the protection of the environment";
    if (values.select == "2") radiobuttons.att9.caption = "La raccolta differenziata contribuisce particolarmente alla protezione dell'ambiente";
    if (values.select == "1") radiobuttons.att10r.caption = "It is useless to recycle as long as not many other people do the same";
    if (values.select == "2") radiobuttons.att10r.caption = "La raccolta differenziata è inutile fintanto che non molte altre persone lo fanno";
    if (values.select == "1") radiobuttons.att11r.caption = "Recycling is more fuss than benefit";
    if (values.select == "2") radiobuttons.att11r.caption = "La raccolta differenziata è più un problema che un vantaggio";
    if (values.select == "1") radiobuttons.att12.caption = "Recycling reduces litter going to the landfill sites";
    if (values.select == "2") radiobuttons.att12.caption = "La raccolta differenziata riduce la quantità di rifiuti nelle discariche";
    if (values.select == "1") radiobuttons.att13.caption = "Recycling contributes to energy conservation";
    if (values.select == "2") radiobuttons.att13.caption = "La raccolta differenziata contribuisce al risparmio energetico";
    if (values.select == "1") radiobuttons.att14.caption = "I get satisfaction by taking part in recycling";
    if (values.select == "2") radiobuttons.att14.caption = "La raccolta differenziata mi dà soddisfazione";
    if (values.select == "1") radiobuttons.att15.caption = "The benefits of recycling are returned back to the community";
    if (values.select == "2") radiobuttons.att15.caption = "I benefici derivati dalla raccolta differenziata vengono restituiti alla comunità";
    
    if (values.select == "1") radiobuttons.iden1.caption = "I think of myself as an environmentally-friendly consumer";
    if (values.select == "2") radiobuttons.iden1.caption = "Mi reputo un consumatore rispettoso dell’ambiente";
    if (values.select == "1") radiobuttons.iden2.caption = "I think of myself as someone who is very concerned with environmental issues";
    if (values.select == "2") radiobuttons.iden2.caption = "Mi reputo una persona molto interessata (o preoccupata per) alle questioni ambientali";
    if (values.select == "1") radiobuttons.iden3r.caption = "I would be embarrassed to be seen as having an environmentally-friendly lifestyle";
    if (values.select == "2") radiobuttons.iden3r.caption = "Mi vergognerei di essere percepito/a come uno/a che segue uno stile di vita rispettoso dell'ambiente";
    if (values.select == "1") radiobuttons.iden4r.caption = "I would not want my family or friends to think of me as someone who is concerned about environmental issues";
    if (values.select == "2") radiobuttons.iden4r.caption = "Non vorrei che la mia famiglia o i miei amici mi vedano come una persona preoccupata per le questioni ambientali";
    
    if(values.select == "1") surveypage.attitude1.caption = "Please indicate the extent to which you agree with each of the following statements";
    if(values.select == "2") surveypage.attitude1.caption = "Indica il tuo grado d’accordo con ciascuna della affermazioni seguenti";
    if(values.select == "1") surveypage.iden.caption = "Please indicate how much each of the following statements applies to you";
    if(values.select == "2") surveypage.iden.caption = "Indica quanto ogni affermazione si applica a te";
    
    if(values.select == "1") surveypage.frequency1.caption = "How often have you done each of the following in the past MONTH?";
    if(values.select == "2") surveypage.frequency1.caption = "Quanto frequentemente hai fatto ciascun dei comportamenti seguenti nell'ultimo MESE?";
    if(values.select == "1") surveypage.frequency2.caption = "How often have you done each of the following in the past MONTH?";
    if(values.select == "2") surveypage.frequency2.caption = "Quanto frequentemente hai fatto ciascun dei comportamenti seguenti nell'ultimo MESE?";
if (values.select == "1") surveypage.demogintro.caption = "Lastly we ask that you indicate some descriptive information about yourself.
    All responses are anonymous.";
    if (values.select == "2") surveypage.demogintro.caption = "Ti chiediamo di rispondere alle ultime seguenti domande.
  Tutte le risposte sono anonime.";
    if (values.select == "1") textbox.age.caption = "Please indicate your age";
    if (values.select == "2") textbox.age.caption = "Quanti anni hai?";
    if (values.select == "1") radiobuttons.gender.caption = "Please indicate your gender.";
    if (values.select == "2") radiobuttons.gender.caption = "Seleziona il genere.";
    if (values.select == "1") radiobuttons.system.caption = "Is the waste sorting system used in the task similar to the one you use at home? [Number and organisation of bins, correct placement of items, etc]";
    if (values.select == "2") radiobuttons.system.caption = "Il sistema di raccolta differenziata utilizzato nell'attività è simile a quello che utilizzi a casa? [Numero e organizzazione dei contenitori, posizionamento corretto degli articoli, ecc.]";
    if (values.select == "1") textbox.location.caption = "Please indicate the Country and City where you are located. For example: 'Milan, Italy'";
    if (values.select == "2") textbox.location.caption = "Indica il Paese e la Città in cui ti trovi. Ad esempio: 'Milan, Italy'";
    ]
    
/ onblockend = [values.abort == 0]
</survey>

    <surveypage surveyintro>
    / stimulusframes = [1= introscale]
    / fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
        / showpagenumbers = false
    </surveypage>
    
        <picture introscale>
        / items = intro19
        / select = values.select
        / erase = true(white)
        /position = (50%, 50%)
        / size = (90%, 90%)
        </picture>
        
        <item intro19>
        / 1 = "intro19.jpeg"
        /2 = "intro19IT.jpeg"
        </item>
        
        
    <surveypage frequency1>
    / caption = "
    "
    / subcaption = "

    
    "
    / questions = [1= freq1, freq2, freq3, freq4, freq5, freq6, freq7, freq8, freq9, freq10, freq11]
    / stimulusframes = [1 = resp]
    / showquestionnumbers = false
    / showpagenumbers = false
    / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
    /responsefontstyle = ("Times New Roman", 1.5%, false, false, false, false, 5, 0)
    / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
    /itemspacing = 15%
    </surveypage>
    
    <picture resp>
        / items = response
        / select = values.select
        / erase = true(white)
        /position = (40%, 17%)
        / size = (60%, 60%)
        </picture>
        <item response>
        / 1 = "responsefreq.png"
        /2 = "responsefreqIT.png"
        </item>


            <radiobuttons freq1>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
        
            <radiobuttons freq2>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq3>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq4>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
        
    
                <radiobuttons freq5>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq6>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq7>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq8>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
        <radiobuttons freq9>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq10>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq11>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
        <surveypage frequency2>
    / caption = "
    "
    / subcaption = "

    
    "        / questions = [1= freq12, freq13, freq14, freq15, freq16, freq17, freq18, freq19, freq20, freq21, freq22, freq23, freq24, freq25, freq26, freq27, freq28, freq29]
            / showquestionnumbers = false
            / showpagenumbers = false
            / stimulusframes = [1 = resp]
            / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
            /responsefontstyle = ("Times New Roman", 1.5%, false, false, false, false, 5, 0)
            / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
            /itemspacing = 20%
        </surveypage>

        <radiobuttons freq12>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq13>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq14>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq15>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
        <radiobuttons freq16>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq17>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq18>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq19>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
        <radiobuttons freq20>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq21>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq22>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq23>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
        <radiobuttons freq24>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq25>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq26>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq27>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
        <radiobuttons freq28>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons freq29>
                / caption = ""
                / options = ("1", "2", "3", "4", "5      ", "NA")
                / optionvalues = ("1", "2", "3", "4", "5", "0")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
    <surveypage attitude1>
    / questions = [1= att1, att2, att3, att4, att5r, att6, att7, att8, att9, att10r, att11r, att12, att13, att14, att15]
    / showquestionnumbers = false
    / showpagenumbers = false
    / caption = "
    "
    / subcaption = "

    
    "
            / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
            /responsefontstyle = ("Times New Roman", 1.5%, false, false, false, false, 5, 0)
            / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
            /itemspacing = 20%
            / stimulusframes = [1= respatt]                                                                                                                                                         
    </surveypage>
    
    <picture respatt>
        / items = attitude
        / select = values.select
        / erase = true(white)
        /position = (40%, 17%)
        / size = (60%, 60%)
        </picture>
        <item attitude>
        / 1 = "responseatt.png"
        /2 = "responseattIT.png"
        </item>
        
        <radiobuttons att1>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att2>
                / caption = ""
            / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att3>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att4>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
            <radiobuttons att5r>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att6>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att7>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att8>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
        <radiobuttons att9>
                / caption = ""
            / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att10r>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att11r>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att12>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
        <radiobuttons att13>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att14>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons att15>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
    
    <surveypage iden>
    / caption = "
    "
    / subcaption = "

    
    "
    /questions = [1= iden1, iden2, iden3r, iden4r]
    / showpagenumbers = false
    / showquestionnumbers = false
            / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
            /responsefontstyle = ("Times New Roman", 1.5%, false, false, false, false, 5, 0)
            / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
            /itemspacing = 10% 
            / stimulusframes = [1= respiden]
    </surveypage>
    
        <picture respiden>
        / items = respiden
        / select = values.select
        / erase = true(white)
        /position = (40%, 17%)
        / size = (60%, 60%)
        </picture>
        <item respiden>
        / 1 = "responseiden.png"
        /2 = "responseidenIT.png"
        </item>
    
            <radiobuttons iden1>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons iden2>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons iden3r>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>
            
                <radiobuttons iden4r>
                / caption = ""
                / options = ("1", "2", "3", "4", "5", "6", "7")
                / optionvalues = ("1", "2", "3", "4", "5", "6", "7")
                / orientation = horizontal
                / required = true
                / txcolor = black
            </radiobuttons>

    <surveypage demogintro>
    / caption = "
    "
    / subcaption = "

    
    "
    / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
    /responsefontstyle = ("Times New Roman", 2%, false, false, false, false, 5, 0)
    / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
    /questions = [1= age, gender, system, location]
    / showpagenumbers = false
    / showquestionnumbers = false
    / itemspacing = 10%
    / ontrialbegin = [
  if (values.select == 1) {
   values.option1 = "Male";
   values.option2 = "Female";
   values.option3 = "Other";
   values.option4 = "Prefer not to say";
   values.option5 = "Very Different";
   values.option6 = "Somewhat Different";
        values.option7 = "Similar";
        values.option8 = "Somewhat the Same";
        values.option9 = "Exactly the Same";
        values.option10 = "I'm not sure";
  } else if (values.select == 2){
   values.option1 = "Maschio";
   values.option2 = "Femmina";
   values.option3 = "Altro";
   values.option4 = "Preferisco non specificare";
   values.option5 = "Completamente Diverso";
   values.option6 = "Abbastanza Diverso";
        values.option7 = "Simile";
        values.option8 = "Abbastanza Uguale";
        values.option9 = "Completamente Uguale";
        values.option10 = "Non lo so";
  }
]
    </surveypage>
    
    <textbox age>
    / caption = ""
    / range = (18, 110)
    / maxchars = (3)
    /textboxsize = (5%, 5%)
    / required = true
    / multiline = false
    </textbox>
    
    <radiobuttons gender>
    / caption = ""
    / options = ("<%values.option1%>", "<%values.option2%>", "<%values.option3%>", "<%values.option4%>")
    / orientation = vertical
    / required = true
    </radiobuttons>
    
    <radiobuttons system>
    / caption = ""
    / options = ("<%values.option5%>", "<%values.option6%>", "<%values.option7%>", "<%values.option8%>", "<%values.option9%>", "<%values.option10%>")
    / optionvalues = ("1", "2", "3", "4", "5", "0")
    / orientation = horizontal
    / required = true
    </radiobuttons>

    <textbox location>
    / caption = ""
    / maxchars = (50)
    /textboxsize = (20%, 5%)
    / required = true
    / multiline = false
    </textbox>

    <surveypage end>
    / stimulusframes = [1 = endinstruct]
    / showpagenumbers = false
    </surveypage>
    
    <picture endinstruct>
    / items = item.end1
    / select = values.select
    /position = (50%, 50%)
    / size = (90%, 90%)
    </picture>
    
        
    <item end1>
    /1 = "intro20.jpeg"
    /2 = "intro20IT.jpeg"
    </item>

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
raynae - 5/14/2021
Sorry I thought there was a standard code I didn't know about. 
My script is a little long but an excerpt is included below:
<survey scales>
/pages = [1= surveyintro; 2= frequency1; 3= frequency2; 4= attitude1; 5= iden; 6=demogintro; 7= end]
/ onblockbegin = [if (radiobuttons.select.response == "1") values.select = 1]
/ onblockbegin = [if (radiobuttons.select.response == "2") values.select = 2]
/ onblockbegin = [
    if (values.select == "1") radiobuttons.freq1.caption = "Looked for ways to reuse things";
    if (values.select == "2") radiobuttons.freq1.caption = "Cercato modi per riutilizzare le cose";
    if (values.select == "1") radiobuttons.freq2.caption = "Encouraged friends or family to recycle";
    if (values.select == "2") radiobuttons.freq2.caption = "Incoraggiato gli amici o la famiglia a fare la raccolta differenziata";
    if (values.select == "1") radiobuttons.freq3.caption = "Purchased products in reusable containers";
    if (values.select == "2") radiobuttons.freq3.caption = "Acquistato prodotti in confezioni riciclabili";
    if (values.select == "1") radiobuttons.freq4.caption = "Picked up litter that was not your own ";
    if (values.select == "2") radiobuttons.freq4.caption = "Raccolto i rifiuti altrui trovati per terra";
    if (values.select == "1") radiobuttons.freq5.caption = "Composted food scraps";
    if (values.select == "2") radiobuttons.freq5.caption = "Compostato i rifiuti organici (per il giardino)";
    if (values.select == "1") radiobuttons.freq6.caption = "Conserved gasoline by walking or bicycling";
    if (values.select == "2") radiobuttons.freq6.caption = "Evitato il consumo di benzina camminando o andando in bicicletta";
    if (values.select == "1") radiobuttons.freq7.caption = "Voted for a candidate who supported environmental issue";
    if (values.select == "2") radiobuttons.freq7.caption = "Votato per un candidato politico che supportava le questioni ambientali";
    if (values.select == "1") radiobuttons.freq8.caption = "Made an effort to conserve resources in your home, such as electricity, natural gas, and water for environmental reasons";
    if (values.select == "2") radiobuttons.freq8.caption = "Fatto lo sforzo di non sprecare risorse domestiche, come elettricità, gas, acqua, per motivi ambiental";
    if (values.select == "1") radiobuttons.freq9.caption = "Intentionally avoided the use of disposable paper or plastic products for environmental reasons";
    if (values.select == "2") radiobuttons.freq9.caption = "Evitato intenzionalmente l’uso di carta usa e getta o prodotti di plastica, per motivi ambientali";
    if (values.select == "1") radiobuttons.freq10.caption = "Intentionally avoided products with necessary packaging, for environmental reasons";
    if (values.select == "2") radiobuttons.freq10.caption = "Evitato intenzionalmente di comprare prodotti imballati, per motivi ambientali";
    if (values.select == "1") radiobuttons.freq11.caption = "Intentionally purchased products manufactured or grown in an environmentally friendly manner";
    if (values.select == "2") radiobuttons.freq11.caption = "Acquistato intenzionalmente prodotti fabbricati o coltivati nel rispetto dell’ambiente";
    if (values.select == "1") radiobuttons.freq12.caption = "Recycled newspapers";
    if (values.select == "2") radiobuttons.freq12.caption = "Fatto la raccolta differenziata di giornali ";
    if (values.select == "1") radiobuttons.freq13.caption = "Recycled cans or metal";
    if (values.select == "2") radiobuttons.freq13.caption = "Fatto la raccolta differenziata di lattine o mettalo";
    if (values.select == "1") radiobuttons.freq14.caption = "Recycled glass";
    if (values.select == "2") radiobuttons.freq14.caption = "Fatto la raccolta differenziata di vetro";
    if (values.select == "1") radiobuttons.freq15.caption = "Recycled plastic";
    if (values.select == "2") radiobuttons.freq15.caption = "Fatto la raccolta differenziata di plastica";
    if (values.select == "1") radiobuttons.freq16.caption = "Recycled food waste";
    if (values.select == "2") radiobuttons.freq16.caption = "Fatto la raccolta differenziata di rifiuti organici";
    if (values.select == "1") radiobuttons.freq17.caption = "Returned old medicines to pharmacies";
    if (values.select == "2") radiobuttons.freq17.caption = "Restituito i medicinali scaduti in farmacia";
    if (values.select == "1") radiobuttons.freq18.caption = "Brought old frying oil to supermarkets and recycling sites";
    if (values.select == "2") radiobuttons.freq18.caption = "Portato ai supermercati o ai siti di raccolta l’olio di frittura usato";
    if (values.select == "1") radiobuttons.freq19.caption = "Donated clothes to charities or brought to recycling sites";
    if (values.select == "2") radiobuttons.freq19.caption = "Donato vestiti usati a enti di beneficienza o li ho portati nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq20.caption = "Gifted old clothing to friends, love-ones or neighbours";
    if (values.select == "2") radiobuttons.freq20.caption = "Regalato vestiti usati ad amici, cari o vicini";
    if (values.select == "1") radiobuttons.freq21.caption = "Reused or repurposed items before disposing/recycling them";
    if (values.select == "2") radiobuttons.freq21.caption = "Riutilizzato più volte gli oggetti (anche con scopi diversi) prima di smaltirli/riciclarli";
    if (values.select == "1") radiobuttons.freq22.caption = "Brought corks to specific recycling points";
    if (values.select == "2") radiobuttons.freq22.caption = "Portato i tappi di bottiglie (plastica o sughero) negli appositi siti di raccolta";
    if (values.select == "1") radiobuttons.freq23.caption = "Brought paint to recycling sites";
    if (values.select == "2") radiobuttons.freq23.caption = "Portato i barratoli di vernice usati nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq24.caption = "Returned an old smartphone and/or other small electronic devices to shops";
    if (values.select == "2") radiobuttons.freq24.caption = "Restituito in negozio un vecchio smartphone e/o altri piccoli dispositivi elettronici";
    if (values.select == "1") radiobuttons.freq25.caption = "Brought garden waste to recycling sites";
    if (values.select == "2") radiobuttons.freq25.caption = "Portato gli scarti vegetali (per es., giardinaggio) nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq26.caption = "Arranged for household furniture or large household waste (e.g., a broken door) to be brought to appropriate recycling sites";
    if (values.select == "2") radiobuttons.freq26.caption = "Predisposto il trasporto di mobili o vecchi articoli domestici di grandi dimensioni (per es., una porta rotta) negli specifici siti di raccolta";
    if (values.select == "1") radiobuttons.freq27.caption = "Gifted or sold old furniture to others";
    if (values.select == "2") radiobuttons.freq27.caption = "Regalato o venduto vecchi mobili ad altri";
    if (values.select == "1") radiobuttons.freq28.caption = "Brought spent lightbulbs to dedicated recycling sites";
    if (values.select == "2") radiobuttons.freq28.caption = "Portato le lampadine fulminate negli appositi siti di raccolta";
    if (values.select == "1") radiobuttons.freq29.caption = "Brought batteries to supermarkets and recycling sites";
    if (values.select == "2") radiobuttons.freq29.caption = "Portato le batterie scariche ai supermercati e nei siti di raccolta";
    
    if (values.select == "1") radiobuttons.att1.caption = "Recycling is important";
    if (values.select == "2") radiobuttons.att1.caption = "La raccolta differenziata è importante";
    if (values.select == "1") radiobuttons.att2.caption = "Each consumer can contribute to the solution of the litter problem in his/her region";
    if (values.select == "2") radiobuttons.att2.caption = "Ogni consumatore può contribuire alla soluzione del problema dei rifiuti nella propria regione";
    if (values.select == "1") radiobuttons.att3.caption = "Recycling benefits are worth-while my time and effort";
    if (values.select == "2") radiobuttons.att3.caption = "I benefici della raccolta differenziata valgono il mio tempo e i miei sforzi";
    if (values.select == "1") radiobuttons.att4.caption = "Recycling helps with natural resources conservation";
    if (values.select == "2") radiobuttons.att4.caption = "La raccolta differenziata contribuisce alla conservazione delle risorse naturali";
    if (values.select == "1") radiobuttons.att5r.caption = "It is rather inconvenient to sort out and transport recycling materials";
    if (values.select == "2") radiobuttons.att5r.caption = "È piuttosto sconveniente smistare e trasportare i rifiuti da riciclare";
    if (values.select == "1") radiobuttons.att6.caption = "The government should issue regulations about the use of recycled and recyclable materials in packaging materials";
    if (values.select == "2") radiobuttons.att6.caption = "Il governo dovrebbe regolamentare l'uso di materiali riciclati e riciclabili negli imballaggi";
    if (values.select == "1") radiobuttons.att7.caption = "Consumers should force the producers to use recyclable materials in their packaging materials";
    if (values.select == "2") radiobuttons.att7.caption = "I consumatori dovrebbero obbligare i produttori a utilizzare materiali riciclabili negli imballaggi";
    if (values.select == "1") radiobuttons.att8.caption = "It is my personal responsibility to help recycling efforts";
    if (values.select == "2") radiobuttons.att8.caption = "È mia responsabilità personale contribuire agli sforzi per la raccolta differenziata";
    if (values.select == "1") radiobuttons.att9.caption = "Recycling is a great help to the protection of the environment";
    if (values.select == "2") radiobuttons.att9.caption = "La raccolta differenziata contribuisce particolarmente alla protezione dell'ambiente";
    if (values.select == "1") radiobuttons.att10r.caption = "It is useless to recycle as long as not many other people do the same";
    if (values.select == "2") radiobuttons.att10r.caption = "La raccolta differenziata è inutile fintanto che non molte altre persone lo fanno";
    if (values.select == "1") radiobuttons.att11r.caption = "Recycling is more fuss than benefit";
    if (values.select == "2") radiobuttons.att11r.caption = "La raccolta differenziata è più un problema che un vantaggio";
    if (values.select == "1") radiobuttons.att12.caption = "Recycling reduces litter going to the landfill sites";
    if (values.select == "2") radiobuttons.att12.caption = "La raccolta differenziata riduce la quantità di rifiuti nelle discariche";
    if (values.select == "1") radiobuttons.att13.caption = "Recycling contributes to energy conservation";
    if (values.select == "2") radiobuttons.att13.caption = "La raccolta differenziata contribuisce al risparmio energetico";
    if (values.select == "1") radiobuttons.att14.caption = "I get satisfaction by taking part in recycling";
    if (values.select == "2") radiobuttons.att14.caption = "La raccolta differenziata mi dà soddisfazione";
    if (values.select == "1") radiobuttons.att15.caption = "The benefits of recycling are returned back to the community";
    if (values.select == "2") radiobuttons.att15.caption = "I benefici derivati dalla raccolta differenziata vengono restituiti alla comunità";
    
    if (values.select == "1") radiobuttons.iden1.caption = "I think of myself as an environmentally-friendly consumer";
    if (values.select == "2") radiobuttons.iden1.caption = "Mi reputo un consumatore rispettoso dell’ambiente";
    if (values.select == "1") radiobuttons.iden2.caption = "I think of myself as someone who is very concerned with environmental issues";
    if (values.select == "2") radiobuttons.iden2.caption = "Mi reputo una persona molto interessata (o preoccupata per) alle questioni ambientali";
    if (values.select == "1") radiobuttons.iden3r.caption = "I would be embarrassed to be seen as having an environmentally-friendly lifestyle";
    if (values.select == "2") radiobuttons.iden3r.caption = "Mi vergognerei di essere percepito/a come uno/a che segue uno stile di vita rispettoso dell'ambiente";
    if (values.select == "1") radiobuttons.iden4r.caption = "I would not want my family or friends to think of me as someone who is concerned about environmental issues";
    if (values.select == "2") radiobuttons.iden4r.caption = "Non vorrei che la mia famiglia o i miei amici mi vedano come una persona preoccupata per le questioni ambientali";
    
    if(values.select == "1") surveypage.attitude1.caption = "Please indicate the extent to which you agree with each of the following statements";
    if(values.select == "2") surveypage.attitude1.caption = "Indica il tuo grado d’accordo con ciascuna della affermazioni seguenti";
    if(values.select == "1") surveypage.iden.caption = "Please indicate how much each of the following statements applies to you";
    if(values.select == "2") surveypage.iden.caption = "Indica quanto ogni affermazione si applica a te";
    
    if(values.select == "1") surveypage.frequency1.caption = "How often have you done each of the following in the past MONTH?";
    if(values.select == "2") surveypage.frequency1.caption = "Quanto frequentemente hai fatto ciascun dei comportamenti seguenti nell'ultimo MESE?";
    if(values.select == "1") surveypage.frequency2.caption = "How often have you done each of the following in the past MONTH?";
    if(values.select == "2") surveypage.frequency2.caption = "Quanto frequentemente hai fatto ciascun dei comportamenti seguenti nell'ultimo MESE?";
if (values.select == "1") surveypage.demogintro.caption = "Lastly we ask that you indicate some descriptive information about yourself.
    All responses are anonymous.";
    if (values.select == "2") surveypage.demogintro.caption = "Ti chiediamo di rispondere alle ultime seguenti domande.
  Tutte le risposte sono anonime.";
    if (values.select == "1") textbox.age.caption = "Please indicate your age";
    if (values.select == "2") textbox.age.caption = "Quanti anni hai?";
    if (values.select == "1") radiobuttons.gender.caption = "Please indicate your gender.";
    if (values.select == "2") radiobuttons.gender.caption = "Seleziona il genere.";
    if (values.select == "1") radiobuttons.system.caption = "Is the waste sorting system used in the task similar to the one you use at home? [Number and organisation of bins, correct placement of items, etc]";
    if (values.select == "2") radiobuttons.system.caption = "Il sistema di raccolta differenziata utilizzato nell'attività è simile a quello che utilizzi a casa? [Numero e organizzazione dei contenitori, posizionamento corretto degli articoli, ecc.]";
    if (values.select == "1") textbox.location.caption = "Please indicate the Country and City where you are located. For example: 'Milan, Italy'";
    if (values.select == "2") textbox.location.caption = "Indica il Paese e la Città in cui ti trovi. Ad esempio: 'Milan, Italy'";
    ]
    
/ onblockend = [values.abort == 0]
</survey>

        
        
    <surveypage frequency1>
    / caption = "
    "
    / subcaption = "

    
    "
    / questions = [1= freq1, freq2, freq3, freq4, freq5, freq6, freq7, freq8, freq9, freq10, freq11]
    / stimulusframes = [1 = resp]
    / showquestionnumbers = false
    / showpagenumbers = false
    / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
    /responsefontstyle = ("Times New Roman", 1.5%, false, false, false, false, 5, 0)
    / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
    /itemspacing = 15%
    </surveypage>

Sorry, I'm not sure what I'm supposed to do with a code snippet that's too incomplete to even run. If you can give me something I can actually work with, I might be able to help.

In that regard, it would also be extremely useful if you could explain in sufficient detail what, exactly, is "messed up" on mobile devices. A screenshot or two may be helpful here.

Thanks.
raynae
raynae
Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)
Group: Forum Members
Posts: 13, Visits: 53
Sorry I thought there was a standard code I didn't know about. 
My script is a little long but an excerpt is included below:
<survey scales>
/pages = [1= surveyintro; 2= frequency1; 3= frequency2; 4= attitude1; 5= iden; 6=demogintro; 7= end]
/ onblockbegin = [if (radiobuttons.select.response == "1") values.select = 1]
/ onblockbegin = [if (radiobuttons.select.response == "2") values.select = 2]
/ onblockbegin = [
    if (values.select == "1") radiobuttons.freq1.caption = "Looked for ways to reuse things";
    if (values.select == "2") radiobuttons.freq1.caption = "Cercato modi per riutilizzare le cose";
    if (values.select == "1") radiobuttons.freq2.caption = "Encouraged friends or family to recycle";
    if (values.select == "2") radiobuttons.freq2.caption = "Incoraggiato gli amici o la famiglia a fare la raccolta differenziata";
    if (values.select == "1") radiobuttons.freq3.caption = "Purchased products in reusable containers";
    if (values.select == "2") radiobuttons.freq3.caption = "Acquistato prodotti in confezioni riciclabili";
    if (values.select == "1") radiobuttons.freq4.caption = "Picked up litter that was not your own ";
    if (values.select == "2") radiobuttons.freq4.caption = "Raccolto i rifiuti altrui trovati per terra";
    if (values.select == "1") radiobuttons.freq5.caption = "Composted food scraps";
    if (values.select == "2") radiobuttons.freq5.caption = "Compostato i rifiuti organici (per il giardino)";
    if (values.select == "1") radiobuttons.freq6.caption = "Conserved gasoline by walking or bicycling";
    if (values.select == "2") radiobuttons.freq6.caption = "Evitato il consumo di benzina camminando o andando in bicicletta";
    if (values.select == "1") radiobuttons.freq7.caption = "Voted for a candidate who supported environmental issue";
    if (values.select == "2") radiobuttons.freq7.caption = "Votato per un candidato politico che supportava le questioni ambientali";
    if (values.select == "1") radiobuttons.freq8.caption = "Made an effort to conserve resources in your home, such as electricity, natural gas, and water for environmental reasons";
    if (values.select == "2") radiobuttons.freq8.caption = "Fatto lo sforzo di non sprecare risorse domestiche, come elettricità, gas, acqua, per motivi ambiental";
    if (values.select == "1") radiobuttons.freq9.caption = "Intentionally avoided the use of disposable paper or plastic products for environmental reasons";
    if (values.select == "2") radiobuttons.freq9.caption = "Evitato intenzionalmente l’uso di carta usa e getta o prodotti di plastica, per motivi ambientali";
    if (values.select == "1") radiobuttons.freq10.caption = "Intentionally avoided products with necessary packaging, for environmental reasons";
    if (values.select == "2") radiobuttons.freq10.caption = "Evitato intenzionalmente di comprare prodotti imballati, per motivi ambientali";
    if (values.select == "1") radiobuttons.freq11.caption = "Intentionally purchased products manufactured or grown in an environmentally friendly manner";
    if (values.select == "2") radiobuttons.freq11.caption = "Acquistato intenzionalmente prodotti fabbricati o coltivati nel rispetto dell’ambiente";
    if (values.select == "1") radiobuttons.freq12.caption = "Recycled newspapers";
    if (values.select == "2") radiobuttons.freq12.caption = "Fatto la raccolta differenziata di giornali ";
    if (values.select == "1") radiobuttons.freq13.caption = "Recycled cans or metal";
    if (values.select == "2") radiobuttons.freq13.caption = "Fatto la raccolta differenziata di lattine o mettalo";
    if (values.select == "1") radiobuttons.freq14.caption = "Recycled glass";
    if (values.select == "2") radiobuttons.freq14.caption = "Fatto la raccolta differenziata di vetro";
    if (values.select == "1") radiobuttons.freq15.caption = "Recycled plastic";
    if (values.select == "2") radiobuttons.freq15.caption = "Fatto la raccolta differenziata di plastica";
    if (values.select == "1") radiobuttons.freq16.caption = "Recycled food waste";
    if (values.select == "2") radiobuttons.freq16.caption = "Fatto la raccolta differenziata di rifiuti organici";
    if (values.select == "1") radiobuttons.freq17.caption = "Returned old medicines to pharmacies";
    if (values.select == "2") radiobuttons.freq17.caption = "Restituito i medicinali scaduti in farmacia";
    if (values.select == "1") radiobuttons.freq18.caption = "Brought old frying oil to supermarkets and recycling sites";
    if (values.select == "2") radiobuttons.freq18.caption = "Portato ai supermercati o ai siti di raccolta l’olio di frittura usato";
    if (values.select == "1") radiobuttons.freq19.caption = "Donated clothes to charities or brought to recycling sites";
    if (values.select == "2") radiobuttons.freq19.caption = "Donato vestiti usati a enti di beneficienza o li ho portati nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq20.caption = "Gifted old clothing to friends, love-ones or neighbours";
    if (values.select == "2") radiobuttons.freq20.caption = "Regalato vestiti usati ad amici, cari o vicini";
    if (values.select == "1") radiobuttons.freq21.caption = "Reused or repurposed items before disposing/recycling them";
    if (values.select == "2") radiobuttons.freq21.caption = "Riutilizzato più volte gli oggetti (anche con scopi diversi) prima di smaltirli/riciclarli";
    if (values.select == "1") radiobuttons.freq22.caption = "Brought corks to specific recycling points";
    if (values.select == "2") radiobuttons.freq22.caption = "Portato i tappi di bottiglie (plastica o sughero) negli appositi siti di raccolta";
    if (values.select == "1") radiobuttons.freq23.caption = "Brought paint to recycling sites";
    if (values.select == "2") radiobuttons.freq23.caption = "Portato i barratoli di vernice usati nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq24.caption = "Returned an old smartphone and/or other small electronic devices to shops";
    if (values.select == "2") radiobuttons.freq24.caption = "Restituito in negozio un vecchio smartphone e/o altri piccoli dispositivi elettronici";
    if (values.select == "1") radiobuttons.freq25.caption = "Brought garden waste to recycling sites";
    if (values.select == "2") radiobuttons.freq25.caption = "Portato gli scarti vegetali (per es., giardinaggio) nei siti di raccolta";
    if (values.select == "1") radiobuttons.freq26.caption = "Arranged for household furniture or large household waste (e.g., a broken door) to be brought to appropriate recycling sites";
    if (values.select == "2") radiobuttons.freq26.caption = "Predisposto il trasporto di mobili o vecchi articoli domestici di grandi dimensioni (per es., una porta rotta) negli specifici siti di raccolta";
    if (values.select == "1") radiobuttons.freq27.caption = "Gifted or sold old furniture to others";
    if (values.select == "2") radiobuttons.freq27.caption = "Regalato o venduto vecchi mobili ad altri";
    if (values.select == "1") radiobuttons.freq28.caption = "Brought spent lightbulbs to dedicated recycling sites";
    if (values.select == "2") radiobuttons.freq28.caption = "Portato le lampadine fulminate negli appositi siti di raccolta";
    if (values.select == "1") radiobuttons.freq29.caption = "Brought batteries to supermarkets and recycling sites";
    if (values.select == "2") radiobuttons.freq29.caption = "Portato le batterie scariche ai supermercati e nei siti di raccolta";
    
    if (values.select == "1") radiobuttons.att1.caption = "Recycling is important";
    if (values.select == "2") radiobuttons.att1.caption = "La raccolta differenziata è importante";
    if (values.select == "1") radiobuttons.att2.caption = "Each consumer can contribute to the solution of the litter problem in his/her region";
    if (values.select == "2") radiobuttons.att2.caption = "Ogni consumatore può contribuire alla soluzione del problema dei rifiuti nella propria regione";
    if (values.select == "1") radiobuttons.att3.caption = "Recycling benefits are worth-while my time and effort";
    if (values.select == "2") radiobuttons.att3.caption = "I benefici della raccolta differenziata valgono il mio tempo e i miei sforzi";
    if (values.select == "1") radiobuttons.att4.caption = "Recycling helps with natural resources conservation";
    if (values.select == "2") radiobuttons.att4.caption = "La raccolta differenziata contribuisce alla conservazione delle risorse naturali";
    if (values.select == "1") radiobuttons.att5r.caption = "It is rather inconvenient to sort out and transport recycling materials";
    if (values.select == "2") radiobuttons.att5r.caption = "È piuttosto sconveniente smistare e trasportare i rifiuti da riciclare";
    if (values.select == "1") radiobuttons.att6.caption = "The government should issue regulations about the use of recycled and recyclable materials in packaging materials";
    if (values.select == "2") radiobuttons.att6.caption = "Il governo dovrebbe regolamentare l'uso di materiali riciclati e riciclabili negli imballaggi";
    if (values.select == "1") radiobuttons.att7.caption = "Consumers should force the producers to use recyclable materials in their packaging materials";
    if (values.select == "2") radiobuttons.att7.caption = "I consumatori dovrebbero obbligare i produttori a utilizzare materiali riciclabili negli imballaggi";
    if (values.select == "1") radiobuttons.att8.caption = "It is my personal responsibility to help recycling efforts";
    if (values.select == "2") radiobuttons.att8.caption = "È mia responsabilità personale contribuire agli sforzi per la raccolta differenziata";
    if (values.select == "1") radiobuttons.att9.caption = "Recycling is a great help to the protection of the environment";
    if (values.select == "2") radiobuttons.att9.caption = "La raccolta differenziata contribuisce particolarmente alla protezione dell'ambiente";
    if (values.select == "1") radiobuttons.att10r.caption = "It is useless to recycle as long as not many other people do the same";
    if (values.select == "2") radiobuttons.att10r.caption = "La raccolta differenziata è inutile fintanto che non molte altre persone lo fanno";
    if (values.select == "1") radiobuttons.att11r.caption = "Recycling is more fuss than benefit";
    if (values.select == "2") radiobuttons.att11r.caption = "La raccolta differenziata è più un problema che un vantaggio";
    if (values.select == "1") radiobuttons.att12.caption = "Recycling reduces litter going to the landfill sites";
    if (values.select == "2") radiobuttons.att12.caption = "La raccolta differenziata riduce la quantità di rifiuti nelle discariche";
    if (values.select == "1") radiobuttons.att13.caption = "Recycling contributes to energy conservation";
    if (values.select == "2") radiobuttons.att13.caption = "La raccolta differenziata contribuisce al risparmio energetico";
    if (values.select == "1") radiobuttons.att14.caption = "I get satisfaction by taking part in recycling";
    if (values.select == "2") radiobuttons.att14.caption = "La raccolta differenziata mi dà soddisfazione";
    if (values.select == "1") radiobuttons.att15.caption = "The benefits of recycling are returned back to the community";
    if (values.select == "2") radiobuttons.att15.caption = "I benefici derivati dalla raccolta differenziata vengono restituiti alla comunità";
    
    if (values.select == "1") radiobuttons.iden1.caption = "I think of myself as an environmentally-friendly consumer";
    if (values.select == "2") radiobuttons.iden1.caption = "Mi reputo un consumatore rispettoso dell’ambiente";
    if (values.select == "1") radiobuttons.iden2.caption = "I think of myself as someone who is very concerned with environmental issues";
    if (values.select == "2") radiobuttons.iden2.caption = "Mi reputo una persona molto interessata (o preoccupata per) alle questioni ambientali";
    if (values.select == "1") radiobuttons.iden3r.caption = "I would be embarrassed to be seen as having an environmentally-friendly lifestyle";
    if (values.select == "2") radiobuttons.iden3r.caption = "Mi vergognerei di essere percepito/a come uno/a che segue uno stile di vita rispettoso dell'ambiente";
    if (values.select == "1") radiobuttons.iden4r.caption = "I would not want my family or friends to think of me as someone who is concerned about environmental issues";
    if (values.select == "2") radiobuttons.iden4r.caption = "Non vorrei che la mia famiglia o i miei amici mi vedano come una persona preoccupata per le questioni ambientali";
    
    if(values.select == "1") surveypage.attitude1.caption = "Please indicate the extent to which you agree with each of the following statements";
    if(values.select == "2") surveypage.attitude1.caption = "Indica il tuo grado d’accordo con ciascuna della affermazioni seguenti";
    if(values.select == "1") surveypage.iden.caption = "Please indicate how much each of the following statements applies to you";
    if(values.select == "2") surveypage.iden.caption = "Indica quanto ogni affermazione si applica a te";
    
    if(values.select == "1") surveypage.frequency1.caption = "How often have you done each of the following in the past MONTH?";
    if(values.select == "2") surveypage.frequency1.caption = "Quanto frequentemente hai fatto ciascun dei comportamenti seguenti nell'ultimo MESE?";
    if(values.select == "1") surveypage.frequency2.caption = "How often have you done each of the following in the past MONTH?";
    if(values.select == "2") surveypage.frequency2.caption = "Quanto frequentemente hai fatto ciascun dei comportamenti seguenti nell'ultimo MESE?";
if (values.select == "1") surveypage.demogintro.caption = "Lastly we ask that you indicate some descriptive information about yourself.
    All responses are anonymous.";
    if (values.select == "2") surveypage.demogintro.caption = "Ti chiediamo di rispondere alle ultime seguenti domande.
  Tutte le risposte sono anonime.";
    if (values.select == "1") textbox.age.caption = "Please indicate your age";
    if (values.select == "2") textbox.age.caption = "Quanti anni hai?";
    if (values.select == "1") radiobuttons.gender.caption = "Please indicate your gender.";
    if (values.select == "2") radiobuttons.gender.caption = "Seleziona il genere.";
    if (values.select == "1") radiobuttons.system.caption = "Is the waste sorting system used in the task similar to the one you use at home? [Number and organisation of bins, correct placement of items, etc]";
    if (values.select == "2") radiobuttons.system.caption = "Il sistema di raccolta differenziata utilizzato nell'attività è simile a quello che utilizzi a casa? [Numero e organizzazione dei contenitori, posizionamento corretto degli articoli, ecc.]";
    if (values.select == "1") textbox.location.caption = "Please indicate the Country and City where you are located. For example: 'Milan, Italy'";
    if (values.select == "2") textbox.location.caption = "Indica il Paese e la Città in cui ti trovi. Ad esempio: 'Milan, Italy'";
    ]
    
/ onblockend = [values.abort == 0]
</survey>

        
        
    <surveypage frequency1>
    / caption = "
    "
    / subcaption = "

    
    "
    / questions = [1= freq1, freq2, freq3, freq4, freq5, freq6, freq7, freq8, freq9, freq10, freq11]
    / stimulusframes = [1 = resp]
    / showquestionnumbers = false
    / showpagenumbers = false
    / itemfontstyle = ("Times New Roman", 2%, true, false, false, false, 5, 0)
    /responsefontstyle = ("Times New Roman", 1.5%, false, false, false, false, 5, 0)
    / subcaptionfontstyle = ("Times New Roman", 3%, true, false, false, false, 5, 0)
    /itemspacing = 15%
    </surveypage>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
raynae - 5/14/2021
Sorry just a follow up question. 
I've published my study on the Inquisit website meaning participants should download the player app to participate. However, the script doesn't seem to work well if people try to run it on their mobile device. In particular the survey page's item spacing is messed up and doesn't seem to follow the '/itemspacing = 'code I've written (when using the same script on the computer everything works fine). Is there an extra line of code I need to use here to make the survey compatible with other devices?

I don't have your surveypage etc. code, so I cannot comment on it.

raynae
raynae
Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)
Group: Forum Members
Posts: 13, Visits: 53
Sorry just a follow up question. 
I've published my study on the Inquisit website meaning participants should download the player app to participate. However, the script doesn't seem to work well if people try to run it on their mobile device. In particular the survey page's item spacing is messed up and doesn't seem to follow the '/itemspacing = 'code I've written (when using the same script on the computer everything works fine). Is there an extra line of code I need to use here to make the survey compatible with other devices?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Dave - 3/22/2021
raynae - 3/22/2021
Hello, hoping you are able to help me again, I want to change the code to use feedback "learning trials". I want that when the target is placed on the wrong location, there is an error message and the item returns to the original location. However, in my current code the item remains in the "wrong" location. Is there a way to reset the item to the original starting position?
<block practice>
/trials = [1-7= paper2]
/ response = correct
/ errormessage = true(error, 200)

</block>

<text error>
/ position = (50%, 75%)
/ items = ("X")
/ color = red
/ fontstyle = ("Arial", 10%, true)
</text>

<trial paper2>

/ ontrialbegin = [
    picture.papertarget.hposition = 50%;
  picture.papertarget.vposition = 40%;
    picture.distractor1.hposition = 70%;
    picture.distractor1.vposition = 40%;
    picture.distractor2.hposition = 30%;
    picture.distractor2.vposition = 40%;
    
]
/ stimulusframes = [1 = glass, paper, plastic, organic, trash; 2 = papertarget; 3 = distractor1; 4=distractor2]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (glass, paper, plastic, organic, trash)
/ iscorrectresponse = [
  trial.paper2.lastdropsource == "papertarget" && trial.paper2.response == "paper"
]
/dropsources = (glasstarget, papertarget, plastictarget, organictarget, trashtarget, distractor1, distractor2)
</trial>

<item glass>
/1 = "GLASS.jpg"
</item>

<item organic>
/1 = "ORGANIC.jpg"
</item>

<item paper>
/1 = "PAPER.jpg"
</item>

<item plastic>
/1 = "PLASTIC.jpg"
</item>

<item trash>
/1 = "TRASH.jpg"
</item>

<picture glass>
/ items = glass
/ position = (10%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture paper>
/ items = paper
/ position = (30%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture plastic>
/ items = plastic
/ position = (50%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture organic>
/ items = organic
/ position = (70%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture trash>
/ items = trash
/ position = (90%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

//Target items //
<picture trashtarget>
/ items = ("trash1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture glasstarget>
/ items = ("glass1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture plastictarget>
/ items = ("plastic1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture papertarget>
/ items = ("paper1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture organictarget>
/ items = ("organic1.jpg")
/ size = (15%, 15%)
/ erase = false
/dropsource = true
</picture>

<picture distractor1>
/ items = ("distractor1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor2>
/ items = ("distractor1a.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor3>
/ items = ("distractor1b.jpeg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

> Is there a way to reset the item to the original starting position?

No. Not within a single trial.

What you can do is something like this:

<block practice>
/trials = [1-7= paper2]
/ errormessage = true(error, 200)
</block>

<text error>
/ position = (50%, 65%)
/ items = ("X")
/ color = red
/ fontstyle = ("Arial", 10%, true)
</text>

<trial paper2>
/ ontrialbegin = [
  picture.papertarget.hposition = 50%;
  picture.papertarget.vposition = 40%;
  picture.distractor1.hposition = 70%;
  picture.distractor1.vposition = 40%;
  picture.distractor2.hposition = 30%;
  picture.distractor2.vposition = 40%;
 
]
/ stimulusframes = [1 = glass, paper, plastic, organic, trash, papertarget, distractor1, distractor2]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (glass, paper, plastic, organic, trash)
/ iscorrectresponse = [
trial.paper2.lastdropsource == "papertarget" && trial.paper2.response == "paper"
]
/dropsources = (glasstarget, papertarget, plastictarget, organictarget, trashtarget, distractor1, distractor2)
/ branch = [
    if (script.currentblock == "practice" && trial.paper2.error) {
        trial.paper2;
    }
]
</trial>

<item glass>
/1 = "GLASS.jpg"
</item>

<item organic>
/1 = "ORGANIC.jpg"
</item>

<item paper>
/1 = "PAPER.jpg"
</item>

<item plastic>
/1 = "PLASTIC.jpg"
</item>

<item trash>
/1 = "TRASH.jpg"
</item>

<picture glass>
/ items = glass
/ position = (10%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture paper>
/ items = paper
/ position = (30%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture plastic>
/ items = plastic
/ position = (50%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture organic>
/ items = organic
/ position = (70%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture trash>
/ items = trash
/ position = (90%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

//Target items //
<picture trashtarget>
/ items = ("trash1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture glasstarget>
/ items = ("glass1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture plastictarget>
/ items = ("plastic1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture papertarget>
/ items = ("paper1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture organictarget>
/ items = ("organic1.jpg")
/ size = (15%, 15%)
/ erase = false
/dropsource = true
</picture>

<picture distractor1>
/ items = ("distractor1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor2>
/ items = ("distractor1a.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor3>
/ items = ("distractor1b.jpeg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
raynae - 3/22/2021
Hello, hoping you are able to help me again, I want to change the code to use feedback "learning trials". I want that when the target is placed on the wrong location, there is an error message and the item returns to the original location. However, in my current code the item remains in the "wrong" location. Is there a way to reset the item to the original starting position?
<block practice>
/trials = [1-7= paper2]
/ response = correct
/ errormessage = true(error, 200)

</block>

<text error>
/ position = (50%, 75%)
/ items = ("X")
/ color = red
/ fontstyle = ("Arial", 10%, true)
</text>

<trial paper2>

/ ontrialbegin = [
    picture.papertarget.hposition = 50%;
  picture.papertarget.vposition = 40%;
    picture.distractor1.hposition = 70%;
    picture.distractor1.vposition = 40%;
    picture.distractor2.hposition = 30%;
    picture.distractor2.vposition = 40%;
    
]
/ stimulusframes = [1 = glass, paper, plastic, organic, trash; 2 = papertarget; 3 = distractor1; 4=distractor2]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (glass, paper, plastic, organic, trash)
/ iscorrectresponse = [
  trial.paper2.lastdropsource == "papertarget" && trial.paper2.response == "paper"
]
/dropsources = (glasstarget, papertarget, plastictarget, organictarget, trashtarget, distractor1, distractor2)
</trial>

<item glass>
/1 = "GLASS.jpg"
</item>

<item organic>
/1 = "ORGANIC.jpg"
</item>

<item paper>
/1 = "PAPER.jpg"
</item>

<item plastic>
/1 = "PLASTIC.jpg"
</item>

<item trash>
/1 = "TRASH.jpg"
</item>

<picture glass>
/ items = glass
/ position = (10%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture paper>
/ items = paper
/ position = (30%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture plastic>
/ items = plastic
/ position = (50%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture organic>
/ items = organic
/ position = (70%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture trash>
/ items = trash
/ position = (90%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

//Target items //
<picture trashtarget>
/ items = ("trash1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture glasstarget>
/ items = ("glass1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture plastictarget>
/ items = ("plastic1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture papertarget>
/ items = ("paper1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture organictarget>
/ items = ("organic1.jpg")
/ size = (15%, 15%)
/ erase = false
/dropsource = true
</picture>

<picture distractor1>
/ items = ("distractor1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor2>
/ items = ("distractor1a.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor3>
/ items = ("distractor1b.jpeg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

> Is there a way to reset the item to the original starting position?

No. Not within a single trial.

raynae
raynae
Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)Associate Member (189 reputation)
Group: Forum Members
Posts: 13, Visits: 53
Hello, hoping you are able to help me again, I want to change the code to use feedback "learning trials". I want that when the target is placed on the wrong location, there is an error message and the item returns to the original location. However, in my current code the item remains in the "wrong" location. Is there a way to reset the item to the original starting position?
<block practice>
/trials = [1-7= paper2]
/ response = correct
/ errormessage = true(error, 200)

</block>

<text error>
/ position = (50%, 75%)
/ items = ("X")
/ color = red
/ fontstyle = ("Arial", 10%, true)
</text>

<trial paper2>

/ ontrialbegin = [
    picture.papertarget.hposition = 50%;
  picture.papertarget.vposition = 40%;
    picture.distractor1.hposition = 70%;
    picture.distractor1.vposition = 40%;
    picture.distractor2.hposition = 30%;
    picture.distractor2.vposition = 40%;
    
]
/ stimulusframes = [1 = glass, paper, plastic, organic, trash; 2 = papertarget; 3 = distractor1; 4=distractor2]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (glass, paper, plastic, organic, trash)
/ iscorrectresponse = [
  trial.paper2.lastdropsource == "papertarget" && trial.paper2.response == "paper"
]
/dropsources = (glasstarget, papertarget, plastictarget, organictarget, trashtarget, distractor1, distractor2)
</trial>

<item glass>
/1 = "GLASS.jpg"
</item>

<item organic>
/1 = "ORGANIC.jpg"
</item>

<item paper>
/1 = "PAPER.jpg"
</item>

<item plastic>
/1 = "PLASTIC.jpg"
</item>

<item trash>
/1 = "TRASH.jpg"
</item>

<picture glass>
/ items = glass
/ position = (10%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture paper>
/ items = paper
/ position = (30%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture plastic>
/ items = plastic
/ position = (50%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture organic>
/ items = organic
/ position = (70%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

<picture trash>
/ items = trash
/ position = (90%, 80%)
/ size = (20%, 20%)
/ erase = false
/ droptarget = true
</picture>

//Target items //
<picture trashtarget>
/ items = ("trash1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture glasstarget>
/ items = ("glass1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture plastictarget>
/ items = ("plastic1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture papertarget>
/ items = ("paper1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture organictarget>
/ items = ("organic1.jpg")
/ size = (15%, 15%)
/ erase = false
/dropsource = true
</picture>

<picture distractor1>
/ items = ("distractor1.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor2>
/ items = ("distractor1a.jpg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>

<picture distractor3>
/ items = ("distractor1b.jpeg")
/ size = (15%, 15%)
/ erase = false
/ dropsource = true
</picture>
Attachments
distractor1.jpg (235 views, 50.00 KB)
distractor1a.jpg (243 views, 6.00 KB)
distractor1b.jpeg (213 views, 6.00 KB)
trash1.jpg (198 views, 17.00 KB)
TRASH.jpg (261 views, 26.00 KB)
GLASS.jpg (221 views, 26.00 KB)
PLASTIC.jpg (250 views, 29.00 KB)
ORGANIC.jpg (215 views, 26.00 KB)
PAPER.jpg (253 views, 26.00 KB)
plastic1.jpg (242 views, 8.00 KB)
glass1.jpg (234 views, 7.00 KB)
organic1.jpg (212 views, 30.00 KB)
paper1.jpg (223 views, 12.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search