? ? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
10 May 2017

Summary of Changes

In Bootstrap, you have input addons and currently in Joomla, if you want to achieve this, you need to create an custom form field.

Other than that, I see a low of extension devs definiing these sort of things in the language string.

Testing Instructions

Add the following code to an XML file for an extension:

You can use addonBefore or addonAfter or both. Take your pick.

<field
	name="foo"
	type="text"
	label="Font Size"
	default="13"
        addonBefore="foo"
	addonAfter="px"
/>

Expected result

screeny

Documentation Changes Required

addonBefore and addonAfter attributes will need adding to: https://docs.joomla.org/Text_form_field_type

avatar C-Lodder C-Lodder - open - 10 May 2017
avatar C-Lodder C-Lodder - change - 10 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 May 2017
Category Layout Libraries Front End Plugins
avatar C-Lodder C-Lodder - change - 10 May 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 10 May 2017
avatar C-Lodder C-Lodder - change - 10 May 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 10 May 2017
Category Layout Libraries Front End Plugins Layout Libraries
avatar C-Lodder C-Lodder - change - 10 May 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 10 May 2017
avatar Bakual
Bakual - comment - 10 May 2017

I like the idea. The only downside I see is that the layout is more coubled to BS4 now. Previously it was framwork agnostic.
But since the layout is overrideable anyway it isn't an issue in my eyes (other views may differ).

avatar mbabker
mbabker - comment - 10 May 2017

The markup might be Bootstrap specific but at least the concept isn't (Foundation supports input groups out of the box, I want to say I've seen something like it with Semantic UI or Materialize too).

avatar C-Lodder C-Lodder - change - 10 May 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 10 May 2017
avatar C-Lodder C-Lodder - change - 10 May 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 10 May 2017
avatar C-Lodder
C-Lodder - comment - 10 May 2017

Added support for before and after the input. Testing instructions also updated.

avatar dgt41
dgt41 - comment - 10 May 2017

@Bakual @mbabker just provide a way to override the XMLs (similar to layouts). Then it's framework agnostic ;)

avatar C-Lodder C-Lodder - change - 10 May 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 10 May 2017
avatar mbabker
mbabker - comment - 10 May 2017

XML can be overridden, find a plugin hook before your chosen form is loaded and add a lookup path for your override path, problem solved. Option B is existing plugin events where you can manipulate the JForm instance. 😉

(No, we shouldn't be making form declarations as easy to override as layouts because those serve a completely different purpose and we'd be getting a lot of "I overrode X form and all my crap broke" reports if we did it)

e66b528 10 May 2017 avatar C-Lodder PHPCS
avatar Bakual
Bakual - comment - 10 May 2017

@dgt41 Actually, you don't need to override the XML. Overriding the JLayout works fine for that case 😄

avatar ciar4n
ciar4n - comment - 12 May 2017

I have tested this item ✅ successfully on e66b528

Nice!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15939.

avatar ciar4n ciar4n - test_item - 12 May 2017 - Tested successfully
avatar dgt41
dgt41 - comment - 12 May 2017

I have tested this item ✅ successfully on e66b528


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15939.

avatar dgt41 dgt41 - test_item - 12 May 2017 - Tested successfully
avatar dgt41 dgt41 - change - 12 May 2017
Status Pending Ready to Commit
avatar dgt41
dgt41 - comment - 12 May 2017
avatar wilsonge wilsonge - change - 13 May 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-13 19:21:58
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 13 May 2017
avatar wilsonge wilsonge - merge - 13 May 2017

Add a Comment

Login with GitHub to post a comment