Jump to content

[SOLVED] DRBPoll plus links


JADASDesigner

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.