Viewing 3 reply threads
  • Author
    Posts
    • #5272
      argonaut70
      Member

      I’ve created a meta box, and added a class to the array of attributes, but it doesn’t appear to render when I view the output source. I have:

      piklist('field', array(
          'type' => 'textarea',
          'field' => 'intro-para',
          'label' => 'Introductory paragraph',
          'description' => 'Add an introductory paragraph for this page.',
          'attributes' => array(
            'rows' => 5,
            'cols' => 50,
            'class' => 'my-intro-text'
          )
        ));

      Any help appreciated.
      Thanks.

    • #5278
      Steve
      Keymaster

      @argonaut70– Welcome to the Piklist community!

      I just tried your code and it worked for me. The class shows on the actual input. Try viewing the source of the entire page and searching for my-intro-text.

      Let us know if you are still having an issue.

    • #5279
      argonaut70
      Member

      Hi Steve,

      I apologise. I was looking for it on the output. My mistake. I can indeed see it on the input, as you suggested.

      Thanks for the quick response.

    • #5280
      Steve
      Keymaster

      Great! Closing ticket.

Viewing 3 reply threads
  • The topic ‘Class attribute doesn't appear to work’ is closed to new replies.