Playing with extensions at the moment as the opportunity to create one arised. I have a few questions.
The extension is called Field Maths
It came around because I was using cutom fields for a simple ratings system. I had 1-6 custom fields with a dropdown list of 1-10 rating
I was then adding them all and dividing by their sum to get an overall rating using php in the template. This worked fine but ti was difficult to pass around that overall result to various other templates. So I thought why not create an extra custom field and let an extension fill in the field.
So the plan was to
- Enable our extension
- Goto your settings
- Fill in field ids to be used
- Fill in overall results field id
- Choose your sum. There could be a few like just multiplication or the rating sum mentioned above etc.
- Then on your publish page choose your values from the dropdown fields for each value
- Do a quick save and it would update your overall field
- Click save and now you have your overall value in your database.
I have created all the extension framework except for the settings and logic. Do you think this is a good idea/ ANy tips on getting values from custom fields, creating the objects etc.Any help would be great thanks.
