Viewing 4 reply threads
  • Author
    Posts
    • #2348
      Jason
      Keymaster

      Greetings!

      I’ve been using the html field a bit more recently, and I noticed something which I’m not sure if it’s intended or not. According to the html docs a field element isn’t necessary, which would make sense since it’s not storing any meta-data from the field. But, if no field is specified and more than one html field is used, then the second one will override the first. To make more than one display the field element must be included.

      Whatever the intention, this should probably be made note of in the doc. 🙂

    • #2405
      Steve
      Keymaster

      @jason- I can’t reproduce. This is working for me. See screenshot.

      piklist('field', array(
        'type' => 'html'
        ,'label' => 'HTML Field'
        ,'description' => 'First field'
        ,'value' => 'First value'
      ));
      
      
      piklist('field', array(
        'type' => 'html'
        ,'label' => 'HTML Field 2'
        ,'description' => 'Second field'
        ,'value' => 'Second value'
      ));
      
      Attachments:
      You must be logged in to view attached files.
    • #2412
      Jason
      Keymaster

      Hmm.. I wonder if this is broken in 0.9.5d, then.

      piklist('field', array(
        'type'    => 'html',
        'label'   => 'Field 1',
        'value'   => '<p>Field 1</p>',
      ));
      
      piklist('field', array(
        'type'    => 'html',
        'label'   => 'Field 2',
        'value'   => '<p>Field 2</p>',
      ));

    • #2416
      Steve
      Keymaster

      @jason– I was testing meta, you were testing settings. The field parameter is only required for settings pages. I updated the docs >

    • #2419
      Jason
      Keymaster

      Cool! My only concern would be that it’s not actually storing the html field in the settings, right?

Viewing 4 reply threads
  • You must be logged in to reply to this topic.