User tests: Successful: Unsuccessful:
I'm trying to create a new custom fields plugin for the standard Joomla Form Field Number. We have it for Integer and i'd like to have the same for the number field. That way w'll also gain ability to use floats.
I'm not there yet and i need help! Thats why i created this Draft PR. Hoping smarter people like here will be willing to guide me as to whats missing still.
I'm having the issue where the view of the custom field in an e.g. article is generating a list field. How and where do i fix this? It should generate a numbers field.
I know i still need to add the sql but i first like to get the main code working correctly.
Extra plugin added
You can discover the extension and then use it in custom fields. It's called numbers.
No numbers custom field available.
Numbers custom field available and working.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Front End Plugins |
Labels |
Added:
Language Change
PR-5.2-dev
|
Labels |
Added:
Feature
|
So the wall i'm hitting now is that i can't figure out how the display of the custom field in an "article edit view" is set or adjusted. Looking at for instance the integer custom field it sort of automagically seems to work. Because i can't seem to find a reference anywhere in the plugin folder itself.
Could someone point me in the right direction here?
I'm not there yet and i need help!
There is still some work to be done regarding the databases and the installation, see e.g.:
A nice example of another plugin can be found here:
https://github.com/joomla/joomla-cms/pull/42777/files
This pull request has been automatically rebased to 5.3-dev.
Category | Administration Language & Strings Front End Plugins | ⇒ | Administration Language & Strings SQL Installation Postgresql Front End Plugins |
Labels |
Added:
PR-5.3-dev
|
I have tested this item 🔴 unsuccessfully on 3d8f2bc
I have tested this item and it is not working as expected.
For more information - On discover number field plugin is available and installable. But after onstallation, in standard joomla form the number field is not available.
I have tested this item 🔴 unsuccessfully on 3d8f2bc
@shindebalu Can you please provide the resons for your test result? Also notice that this Pull Request is a draft.
This pull request has been automatically rebased to 6.0-dev.
Title |
|
Labels |
Added:
PR-6.0-dev
Removed: PR-5.2-dev PR-5.3-dev |
I think this one is ready for review. I was wondering tho;
Does anyone think it would be a good idea to implement more layouts or an option to format the number like for instance a currency? Or would that be too much and we should stick to default behaviour of the same core field type?
I'm asking because i have a use case where i want to use this field to display prices. Would be nice if i could set the number formatting in the field settings.
like the integer field?
No i was thinking using https://www.php.net/manual/en/numberformatter.formatcurrency.php and either get locale from the default language or have a list of locales to select from in a dropdown list? The last one would be the "lightest" on rendering is my guess. you could also add an option for the number of fraction digits.
Or just a regular number_format and have 3 settings for currency, thousand seperator and decimal operator.
Category | Administration Language & Strings Front End Plugins SQL Installation Postgresql | ⇒ | SQL Administration com_admin Postgresql Language & Strings Installation Front End Plugins |
Title |
|
@brianteeman Thanks for reviewing and fixing my mistakes.