Results 1 to 12 of 12

Thread: How to add a "backend label" field for form generator/efg ?

  1. #1
    User
    Join Date
    04-01-10.
    Posts
    289

    Frage How to add a "backend label" field for form generator/efg ?

    Hi,

    I've created a thread in EFG forum but no answer so I'm trying again here.

    Does someone know how to add a "backend label" field for each formgenerator and/or efg's text/select/... form fields ?

    Here is my need : I have to create a multilanguages form generator with efg backend data management possibilities.

    The first solution I used was to create one form and use {{iflng::xx}} tags in fields labels. That worked right in FE but in BE, tags where not parsed and so displayed the code {{iflng::xx}}…{{iflgn}} instead of the label of the field.
    I was told the right solution is to create three forms (one per language) using the same fields. But then, datas are dispatched in three different formdatas (depending on the user's language). This is not very practical to use.

    So I imagine a third solution : to modify Formgenerator and/or EFG modulle(s) to add a "Back-End label" field for each form element which should be used for formdata backend listings and exports.

    i suppose this is not very difficult for a well knowing Contao developer but I'm not developer so could someone explain to me if this is possible and how ?

    Thanks.

  2. #2
    New user
    Join Date
    10-24-13.
    Location
    Crailsheim
    Posts
    11

    Default

    Quote Originally Posted by charled View Post
    The first solution I used was to create one form and use {{iflng::xx}} tags in fields labels. That worked right in FE but in BE, tags where not parsed and so displayed the code {{iflng::xx}}…{{iflgn}} instead of the label of the field.
    I was told the right solution is to create three forms (one per language) using the same fields. But then, datas are dispatched in three different formdatas (depending on the user's language). This is not very practical to use.
    So this is a correct Contao behavior. It does not render the "insert tags" in the backend. Otherwise you are not able to edit them
    So the tags are only replaced in the Frontend.

  3. #3
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Quote Originally Posted by zero View Post
    So this is a correct Contao behavior. It does not render the "insert tags" in the backend. Otherwise you are not able to edit them
    So the tags are only replaced in the Frontend.
    Thanks Zero for your answer.

    I know for inserttags not rendered in BE as someone else did explain it to me. Then, what do you think of my third solution : adding a "BE label" field in formgenerator and EFG modules that will be used in EFG formdata listings and exports instead of the usual one ?
    Last edited by charled; 11/18/2013 at 16:28.

  4. #4
    New user
    Join Date
    10-24-13.
    Location
    Crailsheim
    Posts
    11

    Default

    Quote Originally Posted by charled View Post
    Thanks Zero for your answer.

    I know for inserttags not rendered in BE as someone else did explain it to me. Then, what do you think of my third solution : adding a "BE label" field in formgenerator and EFG modules that will be used in EFG formdata listings and exports instead of the usual one ?
    Your welcome.

    So why not?
    For me I create always a Form foreach Language. So both has its advatage and disadvanteges...

  5. #5
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Quote Originally Posted by zero View Post
    Your welcome.

    So why not?
    For me I create always a Form foreach Language. So both has its advatage and disadvanteges...
    I know this the usual solution. But, EFG creates one formdata per form/language so datas are dispatched. I would prefer to have only one formdata for it is more simple for my client to manage its datas.
    But, if I have the idea, I don't know how to do it.

  6. #6
    New user
    Join Date
    10-24-13.
    Location
    Crailsheim
    Posts
    11

    Default

    Sorry I have not so much experience in extending the EFG.

    What I would do is:
    1. get the multicolumn wizard
    2. With dca configure it to the label or maybe as an extra Field. With Language and Label Text.
    3. by using the "parseTemplate" Hook detect the template and deserialize the Label and put out the correct language.


    Not sure if this works, but I think it should.

  7. #7
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Quote Originally Posted by zero View Post
    Sorry I have not so much experience in extending the EFG.

    What I would do is:
    1. get the multicolumn wizard
    2. With dca configure it to the label or maybe as an extra Field. With Language and Label Text.
    3. by using the "parseTemplate" Hook detect the template and deserialize the Label and put out the correct language.


    Not sure if this works, but I think it should.
    I'm mot sure I'm able to do this but I can try it.
    Just to understand well : your idea is to use multicolumnwizard in label field to create one line per language for use in FE ?

  8. #8
    New user
    Join Date
    10-24-13.
    Location
    Crailsheim
    Posts
    11

    Default

    Yes thats my Idea.

  9. #9
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Ok. But, in which DCA do I have to do that ? I didn´t find formgenerato module files.

  10. #10
    New user
    Join Date
    10-24-13.
    Location
    Crailsheim
    Posts
    11

    Default

    Quote Originally Posted by charled View Post
    Ok. But, in which DCA do I have to do that ? I didn´t find formgenerato module files.
    Thats a good question. I don't know. Sorry. I am not so fimilar with efg.

  11. #11
    New user
    Join Date
    10-24-13.
    Location
    Crailsheim
    Posts
    11

    Default

    So I had a short research in the german Forum:

    https://community.contao.org/de/show...hlight=sprache

    Maybe that helps you to solve it? It seems easier than the way I described.

  12. #12
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Quote Originally Posted by zero View Post
    So I had a short research in the german Forum:

    https://community.contao.org/de/show...hlight=sprache

    Maybe that helps you to solve it? It seems easier than the way I described.
    Thanks. I'll translate and study it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •