New flexform featur

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >
<

New flexform featur

by Steffen Kamper-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

i would like to hear your opinion.
1) There is no official way to set default values for flexform vars via
pageTS. I would like to have this feature. Possible syntax could be
TCAdefaults.tt_content.pi_flexform.myVar = xyz

2) There is no way to give user rights to fields like you can do with
normal db-fields. I would like to have some fields in flexform protected
by uservars. A possible way in flexform XML could be a syntax like
<admin>1</admin>
So this field would be hidden for "non-admins".
May be an option could set the rights to the admin-fields to other
user/usergroups by having a setting in TS
rights.flexformAdminFields = 1 (don't know best way to name it)

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steffen Kamper schrieb:
> Hi,
>
> i would like to hear your opinion.
> 1) There is no official way to set default values for flexform vars via
> pageTS. I would like to have this feature. Possible syntax could be
> TCAdefaults.tt_content.pi_flexform.myVar = xyz

Hm, are now ff-fields unique within the complete ff or not? As us
usually have to address them via the sheet name (which is IMHO a bad
thing) I fear it has to be

TCAdefaults.tt_content.pi_flexform.mySheet.myField = xyz

But I'd be delighted if we can declare that field names have to be
globally unique and you syntax can live.

> 2) There is no way to give user rights to fields like you can do with
> normal db-fields. I would like to have some fields in flexform protected
> by uservars. A possible way in flexform XML could be a syntax like
> <admin>1</admin>
> So this field would be hidden for "non-admins".
> May be an option could set the rights to the admin-fields to other
> user/usergroups by having a setting in TS
> rights.flexformAdminFields = 1 (don't know best way to name it)

Sadly you cannot do anything with ff via TS :-(

I think that in the XML the usual excludeField property should be used.
The only difference would be that you have to enable this field by userTS.

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Steffen Kamper-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Masi,

Martin Kutschker schrieb:

> Steffen Kamper schrieb:
>> Hi,
>>
>> i would like to hear your opinion.
>> 1) There is no official way to set default values for flexform vars via
>> pageTS. I would like to have this feature. Possible syntax could be
>> TCAdefaults.tt_content.pi_flexform.myVar = xyz
>
> Hm, are now ff-fields unique within the complete ff or not? As us
> usually have to address them via the sheet name (which is IMHO a bad
> thing) I fear it has to be
>
> TCAdefaults.tt_content.pi_flexform.mySheet.myField = xyz
>
> But I'd be delighted if we can declare that field names have to be
> globally unique and you syntax can live.

Yes, uniqueness should be required (i think the most do that automatic)
For this uniqueness a check has to be done to generate a warning.

And having uniqueness the syntax can be such easy without fiddling to
get sheetname.

>
>> 2) There is no way to give user rights to fields like you can do with
>> normal db-fields. I would like to have some fields in flexform protected
>> by uservars. A possible way in flexform XML could be a syntax like
>> <admin>1</admin>
>> So this field would be hidden for "non-admins".
>> May be an option could set the rights to the admin-fields to other
>> user/usergroups by having a setting in TS
>> rights.flexformAdminFields = 1 (don't know best way to name it)
>
> Sadly you cannot do anything with ff via TS :-(
>
> I think that in the XML the usual excludeField property should be used.

ah yes, this could be used, and it sounds better.

> The only difference would be that you have to enable this field by userTS.
>
I see the problem because normally TCA is asked for that. In case of
flexforms that is a problem, as they are only definded with the XML,
which is enough while rendering, but difficult for other modules to
extract the information. May be a "virual" TCA could be added to let
TYPO3 know about fields in flexform

vg Steffen

> Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steffen Kamper schrieb:
>
>> The only difference would be that you have to enable this field by
>> userTS.
>>
> I see the problem because normally TCA is asked for that. In case of
> flexforms that is a problem, as they are only definded with the XML,
> which is enough while rendering, but difficult for other modules to
> extract the information. May be a "virual" TCA could be added to let
> TYPO3 know about fields in flexform

I don't understand you. TCEforms parses the ff definition and data to
display the form. Now the only thing missing is a pageTS syntax that
let's you enable/disable/rename/etc the field like a normal field.

The normal way is:

TCEforms.<table>.<field>

Maybe it can be:

TCEforms.<table>.<field>.flexForm.<field>

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Martin Kutschker wrote:
> Steffen Kamper schrieb:
>> i would like to hear your opinion.
>> 1) There is no official way to set default values for flexform vars via
>> pageTS. I would like to have this feature. Possible syntax could be
>> TCAdefaults.tt_content.pi_flexform.myVar = xyz

Yes, this is a missing feature that would be great to have.

> Hm, are now ff-fields unique within the complete ff or not? As us
> usually have to address them via the sheet name (which is IMHO a bad
> thing) I fear it has to be
>
> TCAdefaults.tt_content.pi_flexform.mySheet.myField = xyz

Also sections :)

TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField = 1

What about language? That should be also taken into account,s o the above may become:
TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField.lDE = 1

> Sadly you cannot do anything with ff via TS :-(
>
> I think that in the XML the usual excludeField property should be used.
> The only difference would be that you have to enable this field by userTS.

There is an idea around to modify stdWrap's getData to enable {field:pi_flexform:field_myfield}. But this idea is not implemented due to problems with sheets sections and containers in flexforms.

--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Steffen Kamper-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Martin Kutschker schrieb:

> Steffen Kamper schrieb:
>>> The only difference would be that you have to enable this field by
>>> userTS.
>>>
>> I see the problem because normally TCA is asked for that. In case of
>> flexforms that is a problem, as they are only definded with the XML,
>> which is enough while rendering, but difficult for other modules to
>> extract the information. May be a "virual" TCA could be added to let
>> TYPO3 know about fields in flexform
>
> I don't understand you. TCEforms parses the ff definition and data to
> display the form. Now the only thing missing is a pageTS syntax that
> let's you enable/disable/rename/etc the field like a normal field.
>
> The normal way is:
>
> TCEforms.<table>.<field>
>
> Maybe it can be:
>
> TCEforms.<table>.<field>.flexForm.<field>
>
> Masi

i was thinking of the accesslist in BEuser/usergroup where TCA is parsed
to build the accesslists

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Steffen Kamper-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dmitry,

Dmitry Dulepov [typo3] schrieb:

> Hi!
>
> Martin Kutschker wrote:
>> Steffen Kamper schrieb:
>>> i would like to hear your opinion.
>>> 1) There is no official way to set default values for flexform vars via
>>> pageTS. I would like to have this feature. Possible syntax could be
>>> TCAdefaults.tt_content.pi_flexform.myVar = xyz
>
> Yes, this is a missing feature that would be great to have.
>
>> Hm, are now ff-fields unique within the complete ff or not? As us
>> usually have to address them via the sheet name (which is IMHO a bad
>> thing) I fear it has to be
>>
>> TCAdefaults.tt_content.pi_flexform.mySheet.myField = xyz
>
> Also sections :)
> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField
> = 1
>
> What about language? That should be also taken into account,s o the
> above may become:
> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField.lDE
> = 1
>

:o this sounds very complex, and i fear that only extension author is
able to set these default right :)

But you're right that all hve to be taken in account, but it would be
helpful to find a more userfriendly way.

btw - the language handling in flexform is quite a mystery for me.
Mostly in flexforms lang-handling is disabled to supress multiple flexforms.
Should lang handling used in conditions as usual?
[globalVar = GP:L = 2]...[end]

>> Sadly you cannot do anything with ff via TS :-(
>>
>> I think that in the XML the usual excludeField property should be used.
>> The only difference would be that you have to enable this field by
>> userTS.
>
> There is an idea around to modify stdWrap's getData to enable
> {field:pi_flexform:field_myfield}. But this idea is not implemented due
> to problems with sheets sections and containers in flexforms.
>
this can be really expensive because flexform-xml has to be read into
array for each.

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Steffen Kamper wrote:
> btw - the language handling in flexform is quite a mystery for me.
> Mostly in flexforms lang-handling is disabled to supress multiple
> flexforms.

It is described in FE localzation guide but I must admit I reread that doc several times before I could understood all details and make a whole picture. Definitely not a morning reading :D

> Should lang handling used in conditions as usual?
> [globalVar = GP:L = 2]...[end]

Hmmmm. Where?

> this can be really expensive because flexform-xml has to be read into
> array for each.

Yes :( But there is a demand for it.

--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steffen Kamper schrieb:

> Hi,
>
> Martin Kutschker schrieb:
>> Steffen Kamper schrieb:
>>>> The only difference would be that you have to enable this field by
>>>> userTS.
>>>>
>>> I see the problem because normally TCA is asked for that. In case of
>>> flexforms that is a problem, as they are only definded with the XML,
>>> which is enough while rendering, but difficult for other modules to
>>> extract the information. May be a "virual" TCA could be added to let
>>> TYPO3 know about fields in flexform
>>
>> I don't understand you. TCEforms parses the ff definition and data to
>> display the form. Now the only thing missing is a pageTS syntax that
>> let's you enable/disable/rename/etc the field like a normal field.
>>
>> The normal way is:
>>
>> TCEforms.<table>.<field>
>>
>> Maybe it can be:
>>
>> TCEforms.<table>.<field>.flexForm.<field>
>>
>> Masi
>
> i was thinking of the accesslist in BEuser/usergroup where TCA is parsed
> to build the accesslists

Too complicated to implement as you pointed out and the list of fields
to configure in the form would be even longer. It's dreadful as it is.

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dmitry Dulepov [typo3] schrieb:

> Hi!
>
> Martin Kutschker wrote:
>> Steffen Kamper schrieb:
>>> i would like to hear your opinion.
>>> 1) There is no official way to set default values for flexform vars via
>>> pageTS. I would like to have this feature. Possible syntax could be
>>> TCAdefaults.tt_content.pi_flexform.myVar = xyz
>
> Yes, this is a missing feature that would be great to have.
>
>> Hm, are now ff-fields unique within the complete ff or not? As us
>> usually have to address them via the sheet name (which is IMHO a bad
>> thing) I fear it has to be
>>
>> TCAdefaults.tt_content.pi_flexform.mySheet.myField = xyz
>
> Also sections :)
> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField
> = 1

Sections? Oops, where does that come from? All the little pi flexforms
have none, or do they? The "standard" ff  and their API in pibase don't
talk about them.

Anyway Steffen ad I want that a fieldname is unique within the full
flexform so sections and containers shouldn't be addressed.

But obviously I haven't used the whole power of flexforms yet.

> What about language? That should be also taken into account,s o the
> above may become:
> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField.lDE
> = 1

Nice to have, but you don't have this for normal fields, so no strict
requirement.

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Steffen Kamper-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Martin Kutschker schrieb:

> Dmitry Dulepov [typo3] schrieb:
>> Hi!
>>
>> Martin Kutschker wrote:
>>> Steffen Kamper schrieb:
>>>> i would like to hear your opinion.
>>>> 1) There is no official way to set default values for flexform vars via
>>>> pageTS. I would like to have this feature. Possible syntax could be
>>>> TCAdefaults.tt_content.pi_flexform.myVar = xyz
>> Yes, this is a missing feature that would be great to have.
>>
>>> Hm, are now ff-fields unique within the complete ff or not? As us
>>> usually have to address them via the sheet name (which is IMHO a bad
>>> thing) I fear it has to be
>>>
>>> TCAdefaults.tt_content.pi_flexform.mySheet.myField = xyz
>> Also sections :)
>> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField
>> = 1
>
> Sections? Oops, where does that come from? All the little pi flexforms
> have none, or do they? The "standard" ff  and their API in pibase don't
> talk about them.
>
> Anyway Steffen ad I want that a fieldname is unique within the full
> flexform so sections and containers shouldn't be addressed.
>
> But obviously I haven't used the whole power of flexforms yet.
>
>> What about language? That should be also taken into account,s o the
>> above may become:
>> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField.lDE
>> = 1
>
> Nice to have, but you don't have this for normal fields, so no strict
> requirement.
>
> Masi

hehe - that was a question i had sometimes before. This section-feature
is still an undocumented feature that Kasper described in a video and
Patrick used in pbsurvay. I really would like to have that documented.

Havin sections is equivalent to arrays, so it should be no problem to
adress them with array key.
This has no influence to the mentioned uniquness of field names in
flexforms.

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Martin Kutschker wrote:
> Sections? Oops, where does that come from? All the little pi flexforms
> have none, or do they? The "standard" ff  and their API in pibase don't
> talk about them.

Sections is a standard feature of flexforms, they implement an array of elements inside the flexform. You can sections in plugin configuration, for example (similar to IRRE but without intermediate records).

> Anyway Steffen ad I want that a fieldname is unique within the full
> flexform so sections and containers shouldn't be addressed.

Not possible I afraid. You can have fields with the same name inside different containers in the flexform:

[CO] ROOT
        [SH] Sheet 1
                [EL] field_title =
                [SC] field_repeating
                        [CO] field_sub
                                [EL] field_title
                        [CO] field_sub
                                [EL] field_title
        [SH] Sheet 2
                [EL] field_title
                [SC] field_repeating
                        [CO] field_sub
                                [EL] field_title
                        [CO] field_sub
                                [EL] field_title
                        [CO] field_sub
                                [EL] field_title

This is fully legal for flexforms.

>> What about language? That should be also taken into account,s o the
>> above may become:
>> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField.lDE
>> = 1
>
> Nice to have, but you don't have this for normal fields, so no strict
> requirement.

You may want to define different values to field_title for different languages ;)

--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Steffen Kamper wrote:
> This has no influence to the mentioned uniquness of field names in
> flexforms.

Field names are unique only on the same level.

--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dmitry Dulepov [typo3] schrieb:
> Hi!
>
> Steffen Kamper wrote:
>> This has no influence to the mentioned uniquness of field names in
>> flexforms.
>
> Field names are unique only on the same level.

This has probably some benefits, but it has at least one major
disadvantage. You can never rearrange a flex form. Once a field is on
one sheet it has to stay there. Tying the UI to the storage wasn't so
fortunate.

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Martin Kutschker wrote:
> This has probably some benefits, but it has at least one major
> disadvantage. You can never rearrange a flex form. Once a field is on
> one sheet it has to stay there. Tying the UI to the storage wasn't so
> fortunate.

True. It already causes problems, for example, in comments extension where I cannot rearrange options on tabs without breaking compatibility.

--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Steffen Kamper-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dmitry Dulepov [typo3] schrieb:

> Hi!
>
> Martin Kutschker wrote:
>> Sections? Oops, where does that come from? All the little pi flexforms
>> have none, or do they? The "standard" ff  and their API in pibase don't
>> talk about them.
>
> Sections is a standard feature of flexforms, they implement an array of
> elements inside the flexform. You can sections in plugin configuration,
> for example (similar to IRRE but without intermediate records).
>
>> Anyway Steffen ad I want that a fieldname is unique within the full
>> flexform so sections and containers shouldn't be addressed.
>
> Not possible I afraid. You can have fields with the same name inside
> different containers in the flexform:
>
> [CO] ROOT
>     [SH] Sheet 1
>         [EL] field_title =
>         [SC] field_repeating
>             [CO] field_sub
>                 [EL] field_title
>             [CO] field_sub
>                 [EL] field_title
>     [SH] Sheet 2
>         [EL] field_title
>         [SC] field_repeating
>             [CO] field_sub
>                 [EL] field_title
>             [CO] field_sub
>                 [EL] field_title
>             [CO] field_sub
>                 [EL] field_title
>
> This is fully legal for flexforms.
>
>>> What about language? That should be also taken into account,s o the
>>> above may become:
>>> TCAdefaults.tt_content.pi_flexform.mySheet.mySection.myContainer.myAnotherContainer.myField.lDE
>>>
>>> = 1
>>
>> Nice to have, but you don't have this for normal fields, so no strict
>> requirement.
>
> You may want to define different values to field_title for different
> languages ;)
>

if it's a section it's internally known, so field can be adressed with
something like
...pi_flexform.field_title.1

It's only important to have this unique on first level, do you agree?

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Dmitry Dulepov [typo3] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Steffen Kamper wrote:
> if it's a section it's internally known, so field can be adressed with
> something like
> ...pi_flexform.field_title.1
>
> It's only important to have this unique on first level, do you agree?

Let's put it this way: it is unuque on its level if it is not a direct subelement of section.

--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: New flexform featur

by Ernesto Baschny [cron IT] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steffen Kamper wrote: on 13.07.2008 18:03:

> i would like to hear your opinion.
> 1) There is no official way to set default values for flexform vars via
> pageTS. I would like to have this feature. Possible syntax could be
> TCAdefaults.tt_content.pi_flexform.myVar = xyz

The content of the "pi_flexform" information depends on what the plugin
that reads them wants to do with them. So it depends on the contents of
the "list_type" field, the "flexform_ds.xml" file, and also if the
plugin really makes use of the pibase flexform functions to load those
stuff.

So if you have 2 different plugins in one tree,
"pi_flexform.sheetName.setting" might conflict.

Maybe we need to include pi_name in between:

TCAdefaults.tt_content.pi_flexform.user_plugin_pi1.mySheet.myVar = xyz

where user_plugin_pi is the piKey defined in ext_tables.php for that
flexform.


Cheers,
Ernesto
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev