Jump to content

Recommended Posts

So I am using the poll from http://www.dbscripts.net/poll/ andit is perfect for what I need.  I just want to configure it, so the values that people choose can also be clickable links.  I.E.

// Twelfth poll definition
$p = new Poll;
$p->question = "Does Race Matter when it comes to electing the president? ";				// Question displayed to the user
$p->returnToURL = "../main.php";				// Specify the URL to return to for this poll; may be relative or absolute
$p->legend = "Cast Your Vote!";						// Form legend; leave empty for none
$p->control_type =$CONTROL_RADIOBUTTONS;			// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
$p->add_value("1", "Yes");				// Poll value ID and a display string
$p->add_value("2", "No");
$VALID_POLLS["12"] = $p;							// "12" is the poll ID

 

could be turned into

 

// Twelfth poll definition
$p = new Poll;
$p->question = "Does Race Matter when it comes to electing the president? ";				// Question displayed to the user
$p->returnToURL = "../main.php";				// Specify the URL to return to for this poll; may be relative or absolute
$p->legend = "Cast Your Vote!";						// Form legend; leave empty for none
$p->control_type =$CONTROL_RADIOBUTTONS;			// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
$p->add_value("1", "<a href = "test.html">Yes</a>");				// Poll value ID and a display string$p->add_value("2", "No");
$VALID_POLLS["12"] = $p;							// "12" is the poll ID

 

When I try to do that, or do

$p->add_value("1", "<a href = \"test.html\">Yes</a>"); // Poll value ID and a display string

 

It prints the text verbatim, and doesn't make it code.  Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/132506-solved-drbpoll-plus-links/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.