Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-6311

Add an 'id' option to the list of parameters when customizing a field on the registration page

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 3.0
    • Administration
    • None

    Description

      When creating 2 fields of radio type for 2 different options they should have the same name, but different id values. The 'name' parameter is used to generate both the name attribute value, but also the id value. There should be an option to override the default generated id for a field:

      #set($field = 
        {'name' : 'favorite_color',
          'label' : 'What is your favorite color',
          'params' : {
            'type' : 'radio',
            'size' : '60',
            'id' : 'myColorId'
          },
          'validate' : {
            'mandatory' : {
              'failureMessage' : $msg.get('core.validation.required.message')
            },
            'regex' : {
              'pattern' : '/^green$/i',
              'failureMessage' : 'You are not cool enough to register here.'
            },
            'fieldOkayMessage' : 'You are awesome.'
          },
          'doAfterRegistration' : '#saveFavoriteColor()'
        })
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oana.tabaranu Elena-Oana Florea
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: