× This forum has been locked. Please submit new Feature Requests on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

custom joomla form FIELDS

9 jaren 9 maanden geleden - 9 jaren 9 maanden geleden #648 door Søren Beck Jensen
Beantwoord door Søren Beck Jensen in topic Vote your Favourite Feature Suggestions!
Hi there. 

We are considering this feature, but help me understand. Pasting XML would not do anything. That would just define the parameters of the field. You would still need to include some php file as well - right?

We have been playing with the idea of allowing community maintained custom fields. So that one user might maintain a "Countries" field and another a "US Phone number" field that validates. But that would require php code as well as XML, and I am not sure there is a real need/defire for it. And that the users could opt to make these fields public for other members to include in their projects.

We just want to think it though so that we only implement something that is a benefit to as many users as possible and as flexible and future proof as possible.

Søren Beck Jensen
Founder, Component-Creator.com
Laatst bewerkt 9 jaren 9 maanden geleden door Søren Beck Jensen.

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

9 jaren 9 maanden geleden - 9 jaren 9 maanden geleden #653 door Pete
Beantwoord door Pete in topic Vote your Favourite Feature Suggestions!
Hi Søren ,

Thanks for looking at this - but NO PHP needed :) That's the beauty of this feature..

If I am running Joomla 2.5+ and I paste XML into this new 'custom XML' field, such as :

<field name="backgroundcolor" type="color" default="#eee"
label="TPL_BEEZ3_FIELD_HEADER_BACKGROUND_COLOR_LABEL"
description="TPL_BEEZ3_FIELD_HEADER_BACKGROUND_COLOR_DESC" />

..and your BUILD compiler places this code in-line in the XML file, then the Joomla color popup will actually work in the resulting component, (even though it is not a field you currently support in Component Creator), because it already exists as a field within Joomla.

Which means, we can use fields you don't yet support in your interface, as soon as they appear in new versions of Joomla..

But more than that, I can use my own custom fields that I have already installed into my Joomla site:

<field name="profile_image" type="petescustomimageuploadfield"
folder="images/myfolder"
label="TPL_BEEZ3_FIELD_IMAGE_LABEL"
description="TPL_BEEZ3_FELD_IMAGE_LABEL" />

OR things like REPEATABLE fields


<field name="list_templates"
type="Repeatable"
icon="list"
description="PLG_TINY_FIELD_TEMPLATE_FIELD_ELEMENTS_DESC"
label="PLG_TINY_FIELD_TEMPLATE_FIELD_ELEMENTS_LABEL"
default="{'template':,'location':,'description':}">
<fields name="params">
<fieldset hidden="true" name="list_templates_modal" repeat="true">
<field name="template"
label="PLG_TINY_FIELD_TEMPLATE_FIELD_NAME_LABEL"
size="30"
type="text" />
<field name="location"
label="PLG_TINY_FIELD_TEMPLATE_FIELD_LOCATION_LABEL"
description="PLG_TINY_FIELD_TEMPLATE_LOCATION_DESC"
size="30"
type="filelist"
directory="media/editors/tinymce/templates"
exclude="index.html"
hide_default="true"
hide_none="true" />
<field name="description"
label="PLG_TINY_FIELD_TEMPLATE_FIELD_DESCRIPTION_LABEL"
size="30"
type="textarea" />
</fieldset>
</fields>
</field>

As you can see, this allows me to have a custom Joomla field that I have developed (and installed into my Joomla) be referenced and used in your forms, without having to hand modify the XML field every time I BUILD the component...

The only other setting we would need, would be the SQL stored data type I guess..



Of course the second (and much more complex) feature, of a library of 'user fields' is also great idea (I thought of that prior to this - but getting that work done to everybody's satisfaction might be difficult and slower to implement :)

I hope that helps clarify my request - its probably the easiest field to build into the system, although I do at least recommend you check the user field XML syntax using something like "XMLReader::isValid()" stackoverflow.com/questions/17191866/how...alidate-xml-with-php

Cheers,
Pete
Laatst bewerkt 9 jaren 9 maanden geleden door Pete.
De volgende gebruiker (s) zei dank u: Søren Beck Jensen

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

9 jaren 9 maanden geleden #654 door Søren Beck Jensen
Beantwoord door Søren Beck Jensen in topic Vote your Favourite Feature Suggestions!
Hi Pete,

Thanks for clarifying. I think we could simply create for instance 8 key value fields that would allow you to enter your own pairs. Such as 
  • Key: name  Value: backgroundcolor
  • Key: type Value: color

Then we can guarantee that the XML we generate is correct and it should give enough flexibility.

Let me know what you think.

Søren Beck Jensen
Founder, Component-Creator.com

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

9 jaren 9 maanden geleden - 9 jaren 9 maanden geleden #655 door Pete
Beantwoord door Pete in topic Vote your Favourite Feature Suggestions!
Hi Søren,

Yes - this may be a slightly safer option :)

Although it would maybe be more flexible to make mandatory Fixed key pair fields for the generic essential values (name, type etc) and then some optional 'repeatable' parameters (where you can keep "add" ing them - like the SELECT LIST option values..

However, this system will not allow us to force in things like "repeat fields", but having said that, repeat fields are unique, and should be fairly simple to add? Its basically just a field 'group' placeholder..

Which adds the following to the top of the group:

<field name="list_templates"
type="Repeatable"
icon="list"
description="PLG_TINY_FIELD_TEMPLATE_FIELD_ELEMENTS_DESC"
label="PLG_TINY_FIELD_TEMPLATE_FIELD_ELEMENTS_LABEL"
default="{'template':,'location':,'description':}">
<fields name="params">
<fieldset hidden="true" name="list_templates_modal" repeat="true">

*Your normal generated fields (including custom ones) here*

And then

</fieldset>
</fields>
</field>

To close of the repeat bit :)

If you add both Custom AND repeatable then I think you have all my requirements covered - I do need both for my current project but custom is more important at this point !!

Thanks for the responding so enthusiastically.. and let me know if any of this is unclear - I have been staying up too late recently watching too much Breaking Bad to communicate well at the moment lol !

Cheers,
Pete
Laatst bewerkt 9 jaren 9 maanden geleden door Pete.

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

9 jaren 9 maanden geleden #662 door Pete
Beantwoord door Pete in topic Vote your Favourite Feature Suggestions!
Hi Folks, any news as to whether this *may* be implemented in the near future ? If not I am going to have to try the XML override plugin system, which is a little less simple :)

Thank,
Pete

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

9 jaren 9 maanden geleden #663 door Søren Beck Jensen
Beantwoord door Søren Beck Jensen in topic Vote your Favourite Feature Suggestions!
Hi Pete. This will definitely be implemented in one form or another, but I don't think we will be able to do so for at least a month and probably more like 2-3 months. 

Sorry

Søren Beck Jensen
Founder, Component-Creator.com

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

Tijd voor maken pagina: 0.058 seconden
Gemaakt door Kunena

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.