How to display same name *date-editor-template="designation" ?

How to display same name *date-editor-template="designation" ?

aidamarimaraidamarimar Posts: 5Questions: 1Answers: 0
Personal Data *
Movement FROM
TO
EFFECTIVE DATE
*

This question has an accepted answers - jump to answer

Answers

  • rf1234rf1234 Posts: 2,988Questions: 87Answers: 421

    Interesting! Could you provide a couple of more details please. A test case as per the forum rules would be great, too.

  • aidamarimaraidamarimar Posts: 5Questions: 1Answers: 0



    The output of this is not match to my likings can someone help me please? How to display designation name just 2 will display

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    You can't have two fields with the same name, which you currently do.

    Beyond that, I think we'd need a link to the page showing the issue, as @rf1234 noted.

    Allan

  • aidamarimaraidamarimar Posts: 5Questions: 1Answers: 0

    Do you have any options how to put 2fields with the same name ?

  • aidamarimaraidamarimar Posts: 5Questions: 1Answers: 0


    I just want to look like this with a double designation name display.

  • aidamarimaraidamarimar Posts: 5Questions: 1Answers: 0

    And how to combine names into one in one field ? like in name of employee field :)

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Do you have any options how to put 2fields with the same name ?

    No. How would you separate them on the server-side? No form will allow duplicate names as far as I am aware - you need to be able to tell the difference between them so you can save them to an appropriate field in the database.

    Perhaps you could all the first one "main_designation" or something else. If the value is identical, you could make the second one readonly (name it designation_ro or something like that) and make it match the value of the first with dependent().

    And how to combine names into one in one field ? like in name of employee field

    Again how do you separate the name to save in the database? You could split on a space, but what to do with those who have a single name, or a three word name? How is it stored in the database?

    It is possible of course, but there are so many edge cases such as those. Generally I would suggest you have one field per database column. That said, to make it happen, have the server give just the name as the data to be loaded into the form, and also split it at the server into its component parts.

    Allan

Sign In or Register to comment.