Jump to content

Need help - creating php script to show input of different fields


boliviano

Recommended Posts

Hey there,

 

I need someone to write me php scripts to analyse and show the input of some custom review fields on the overview page of every listing. My page is about enterprise reviews.

 

Right now, on the overwiew page of every listing, there is only the average user rating to see and the number of people which wrote a review. All information given into the custom review fields can only be accessed by going in every single review. But I want to show more statistical information on the overview page.

 

An example, what I am thinking of:

 

A review Question: "Would you recommend this enterprise to a friend?"  (fieldValue=jr_recommendation)

Answer possibilities (Radio buttons): "Yes" "No"

 

Let´s state that 10 persons answered the question and 5 of them clicked "Yes".

 

On the overview page I want to show something like: "5 out of 10 people would recommend this enterprise to a friend".

 

So the php script has to give out two information: Number of all people who answered the question and the number of all positive answers.

 

I though about something like that (but it did not work)

 

<?php echo count($CustomFields->fieldValue('jr_recommendation',$listing));?>

 

---

 

Furthermore I need something similar for Checkboxes and Multiple select lists:

 

Example:

Question to the user: "Which benefits do your employer offer:"  (jr_benefits)

Anwer Possibilites (Multiple select list): "Mobile Phone" "Notebook" "Car"

 

On the main page I want to show something like:

 

Company benefits:

Mobile Phone (5/10) Notebook (2/10) Car (6/10)

 

The first number is the number of persons which received this benefit and the second number is the total number of all people which gave an answer to this question.

 

So this script has to show the name of the benefit, the number of people which clicked the benefit and the total number of people which answered the question. This has to work for every value of the multiple select list.

 

I hope I could make clear, what I need and someone is able to help me.  If you have question, just ask.

 

Regards

Sascha

 

 

Link to comment
×
×
  • Create New...