HOW TO: Create a Poll with predefined questions/answers using a func??

Hi all,

I am working on a modification for a custom module using the default Poll module...

What I need to do is run a php/javascript function to create a poll with predefined questions and answers.

I want to add this function to another module code, but being new to dolphin I dont know how to include other module functions within its own. I think I would have to include a core file from the Poll module in order for this function to work.

The questions and answers are pretty simple.

Question: "How would rate this?"

Answers: [radio button] value => 1; [radio button] value => 2; [radio button] value => 3; [radio button] value => 4; [radio button] value => 5

 

I found the function that the Poll module uses to create a new poll:

createPoll ( sPollQuestion,
    sPollAnswers,
    sPollResults,
    sTags,
    iCommentGroupValue,
    iVoteGroupValue,
    sCategory,
    iViewGroupValue  
  )  

I want to consider the database inserts that would be created with this custom function from another module.

 

Can someone give me a sample of how I can achieve something like this? I would appreciate any help with this.

 

Thank you

Quote · 25 Jul 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.