S48 to print team captain question responses?

Options

I would like to ask team captains a few questions during registration and then print the responses on their corresponding personal page; is this something that is possible?

 

[[S48:19284:30755:42216]] equates to S48:fr_id:smileytongue:art-type-id:question-id

 

I can see how this snippet wouldn't work, I haven't specified a cons-id to reference, any ideas how I could go about pulling this data?

 

*edit for clarity

Tagged:

Comments

  • Kent Gilliam
    Kent Gilliam Blackbaud Employee
    Ancient Membership Facilitator 4 Name Dropper Photogenic

    Dustin,

     

    I don't know why I didn't get an alert about this post not being answered. I just saw it. Did you figure this out?

     

    The only way I can think of doing this is to use the answers to their questions to populate custom_string fields and then using the S1 tag to render the content of that field wherever you want. That what you're looking for?

     

    Kent

  • Kent Gilliam:

    Dustin,

     

    I don't know why I didn't get an alert about this post not being answered. I just saw it. Did you figure this out?

     

    The only way I can think of doing this is to use the answers to their questions to populate custom_string fields and then using the S1 tag to render the content of that field wherever you want. That what you're looking for?

     

    Kent

    Hi Dustin,

     

    The syntax to pull question responses with S48 actually uses the question text, not the question-id.  You would still want to specify the cons-id, but S1 wouldn't work since that shows the information of the logged in user.  Since this would be for use on personal pages, though, you can use S334 to pull the value of the "px" parameter in the URL, as that is the participant's cons-id.

     

    Since you'll be using S-tags inside another template tag, you'll need to evaluate the inner tags before the outer tag, so use E48 instead of S48.

     

    So, if for example the text of your question was "What... is the air-speed velocity of an unladen swallow?" you would want to use

     


    <p>What... is the air-speed velocity of an unladen swallow?</p>
    <p>[[E48:[[S334:fr_id]]-[[S334:smileytongue:x]]:question:What... is the air-speed velocity of an unladen swallow?]]</p>

     which would render (based on my response)


    <p>What... is the air-speed velocity of an unladen swallow?</p>
    <p>What do you mean? An African or European swallow?</p>

     

    I hope that helps!

  • Kent Gilliam
    Kent Gilliam Blackbaud Employee
    Ancient Membership Facilitator 4 Name Dropper Photogenic
    Chris Backus:

    Hi Dustin,

     

    The syntax to pull question responses with S48 actually uses the question text, not the question-id.  You would still want to specify the cons-id, but S1 wouldn't work since that shows the information of the logged in user.  Since this would be for use on personal pages, though, you can use S334 to pull the value of the "px" parameter in the URL, as that is the participant's cons-id.

     

    Since you'll be using S-tags inside another template tag, you'll need to evaluate the inner tags before the outer tag, so use E48 instead of S48.

     

    So, if for example the text of your question was "What... is the air-speed velocity of an unladen swallow?" you would want to use

     


    <p>What... is the air-speed velocity of an unladen swallow?</p>
    <p>[[E48:[[S334:fr_id]]-[[S334:smileytongue:x]]:question:What... is the air-speed velocity of an unladen swallow?]]</p>

     which would render (based on my response)


    <p>What... is the air-speed velocity of an unladen swallow?</p>
    <p>What do you mean? An African or European swallow?</p>

     

    I hope that helps!

    Oh... I misread that. I read it as populating the collected answer on the participant center page. Go with Chris's answer. 

  • Kent Gilliam:

    Oh... I misread that. I read it as populating the collected answer on the participant center page. Go with Chris's answer. 




    Kent Gilliam wrote:

    Oh... I misread that. I read it as populating the collected answer on the participant center page. Go with Chris's answer. 


     

    (Just in case anybody does want to do that and comes across this in the search...)

     

    For the participant center page, you should be able to get away with:

     


    [[S48:0:question:What... is the air-speed velocity of an unladen swallow?]]

     since they would have to be logged in to access the participant center.

  • Chris Backus:

    Hi Dustin,

     

    The syntax to pull question responses with S48 actually uses the question text, not the question-id.  You would still want to specify the cons-id, but S1 wouldn't work since that shows the information of the logged in user.  Since this would be for use on personal pages, though, you can use S334 to pull the value of the "px" parameter in the URL, as that is the participant's cons-id.

     

    Since you'll be using S-tags inside another template tag, you'll need to evaluate the inner tags before the outer tag, so use E48 instead of S48.

     

    So, if for example the text of your question was "What... is the air-speed velocity of an unladen swallow?" you would want to use

     


    <p>What... is the air-speed velocity of an unladen swallow?</p>
    <p>[[E48:[[S334:fr_id]]-[[S334:smileytongue:x]]:question:What... is the air-speed velocity of an unladen swallow?]]</p>

     which would render (based on my response)


    <p>What... is the air-speed velocity of an unladen swallow?</p>
    <p>What do you mean? An African or European swallow?</p>

     

    I hope that helps!

    Thanks a ton! I haven't had a chance to test this out but knowing it is possible is a huge head start
  • Kent Gilliam:

    Oh... I misread that. I read it as populating the collected answer on the participant center page. Go with Chris's answer. 

    Kudos for trying to help, and I will be needing this in the part center soon, so you're efforts aren't in vein! Thanks again

Categories