Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3773

Tag table cells with field name id

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      http://forum.civicrm.org/index.php?topic=5394

      Attached find two revised template files that add a value to the row tag for profile fields. This enables the user to have more fine-grained control via css of the profile table cells.

      The attached files are for the page and form versions. The file names are identical, so I've prefixed the containing directory. Couple things –

      In Page/Dynamic.tpl, the actual field name is not passed to the template. So I've added the id based on the row number. This is less precise as changes to the profile fields would alter the order. But it works. With the Form/Dynamic.tpl file the actual field name is the defining id.

      One other edit to the Form/Dynamic.tpl file – I've added a class to the table cell that holds the actual field value/form field. With that addition you can have precise control over every cell in the table via css.

      If I run across other instances where this type of addition would be useful, I'll add it.

        Attachments

        1. form_Dynamic.tpl
          6 kB
          Brian Shaughnessy
        2. page_Dynamic.tpl
          0.9 kB
          Brian Shaughnessy

          Activity

            People

            • Assignee:
              kiran.jagtap Kiran Jagtap
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: