× 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 años 9 meses antes - 9 años 9 meses antes #648 por Søren Beck Jensen
Respuesta de Søren Beck Jensen sobre el tema 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
Última Edición: 9 años 9 meses antes por Søren Beck Jensen.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 9 meses antes - 9 años 9 meses antes #653 por Pete
Respuesta de Pete sobre el tema 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
Última Edición: 9 años 9 meses antes por Pete.
El siguiente usuario dijo gracias: Søren Beck Jensen

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 9 meses antes #654 por Søren Beck Jensen
Respuesta de Søren Beck Jensen sobre el tema 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 9 meses antes - 9 años 9 meses antes #655 por Pete
Respuesta de Pete sobre el tema 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
Última Edición: 9 años 9 meses antes por Pete.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 9 meses antes #662 por Pete
Respuesta de Pete sobre el tema 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 9 meses antes #663 por Søren Beck Jensen
Respuesta de Søren Beck Jensen sobre el tema 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Tiempo de carga de la página: 0.064 segundos
Gracias a Foro Kunena

Utilizamos cookies propias y de terceros para mejorar nuestros servicios y mostrarle publicidad relacionada con sus preferencias mediante el análisis de sus hábitos de navegación. Si continua navegando, consideramos que acepta su uso.