Field with entry ID (starting from 1)
This is an open discussion with 4 replies, filed under Extensions.
Search
Incremental number field automatically increases the value by one for every new entry.
You can then use Reflection field to concatenate this value with another field from same entry or static text.
Well, seems like this would be the perfect thing, but it doesn't work with Symphony 2.2.5. I might try to hack it until it works...
EDIT: what's wrong:
Fatal error: Class extension_incremental_number contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Extension::about) in /home/www/janiczek.cz/public_html/martin/extensions/incremental_number/extension.driver.php on line 50
- probably missing about() in extension.driver.php
When I add one, it installs. I go to Sections -> one of my sections, and there:
Missing argument 1 for Field::__construct(), called in /home/www/<snip>/extensions/incremental_number/fields/field.incremental_number.php on line 7 and defined /home/www/<snip>/symphony/lib/toolkit/class.field.php line 158 153 * 154 * @param mixed $parent 155 * The class that created this Field object, usually the FieldManager, 156 * passed by reference. 157 */ 158 public function __construct(&$parent){ 159 $this->_Parent = $parent; 160 $this->_engine = Symphony::Engine(); 161 $this->_handle = (strtolower(get_class($this)) == 'field' ? 'field' : strtolower(substr(get_class($this), 5))); 162 $this->Database = Symphony::Database();
EDIT 2: seems the commit f29cc0cb5a will work for me. :)
Ah, yes. It was recently updated for Symphony 2.3
See compatibility table here, you want v1.0.0.
Create an account or sign in to comment.
Hello,
is there an easy way I'm missing to have an auto-populated field with an unique number? You know, "post 1, post 2, post 3" as they get created...
The System ID doesn't always start from 1; and if I wanted to have a text field, I wonder how can I make it pre-filled automatically? Some kind of Event, maybe? (I don't know much about them.)
~ MJ