Help with Drupal/PHP

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jmvoo's picture

I am a beginner Drupal developer trying to figure out how to create a simple page/form that contains 1. a drop down list of values that can be retrieved from the database, 2. A list of questions that can be rated using Five-Star. I would like to submit this page and then have another page display the results by the drop down value. Basically this is a simplified rating system.

Is Drupal overkill?

Do I write the pages using PHP and then add them to the Drupal content?

Is there a basic distribution that I should be using?

I am experienced in .NET, C#, JSP, JavaScript ...but not PHP or Drupal.

Guidance would be appreciated as I begin learning Drupal.

Comments

IMHO Drupal is not really overkill for anything

Rick Hood's picture

IMHO Drupal is not really overkill for anything - with one big caveat: you have to keep it updated. So for me there is no reason not to use Drupal unless you don't want to bother updating it - but then there is SAAS option like Drupal Gardens. Or for super simple site SquareSpace.

When using Drupal do not think about PHP. Drupal does that all for you for most cases by simply using the GUI interface. Instead of thinking PHP, learn how Drupal does things:

  1. Create a content type and add fields to that content type
  2. Then create lists of content using Views

1 is out of the box with Drupal. #2 requires the Views module, which virtually every Drupal site uses.

What you want to do sounds sounds like this:
- Create a content type called 'question'
- Create a view to list the questions that you (or someone) creates (each question is a Drupal "node" of content type = question)
- One of the fields on the question would contain the values you want to filter that view by - probably use taxonomy for that and the field would be taxonomy reference field. In the View you add that as a field and a filter in the View then "expose" that filter so values can be chosen by users looking at the list.
- Use fivestar module to add the ratings to questions

If the fivestar rating is what you want to use to filter the view of questions by, then make that the exposed filter in the view (I am assuming that can be done).

Google to find YouTube videos on how to use Views is the main thing you'll need to do. Content types is dead easy and so is adding fields to them but you can look for videos on that also.

So, you don't need to write any PHP to do what you want to do in Drupal. It's good that you know PHP in case you want to get into more advanced stuff in Drupal, but you can go a very long ways in Drupal without writing PHP and you may actually get into trouble it you start by trying to write PHP to begin with. Let Drupal do that for you.

Invest the time learning Drupal

dtrain's picture

Here's what you need to do before you write any custom PHP code:

  1. Install the Acquia Developer Desktop: https://www.acquia.com/products-services/dev-desktop

  2. Install Drupal 7 on your Developer Desktop.

  3. Install the webform module

  4. Install Survey builder module

  5. Install the fivestar module.

Experiment with the above contrib modules to see if they fit your specific needs. If not, look for other contrib modules (there are over 10,000) or consider writing a custom Drupal module.

BTW, there are several great Drupal books out there and there are tons of training videos. Drupalize me is a great place to get started: https://drupalize.me/

You will be glad you invested the time learning Drupal. Drupal pros are in high demand.

Derek

Drupal for Ubuntu

jmvoo's picture

Is there a dev-desktop for Ubuntu?

Jeanne

Boston

Group categories

More Specifically

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: