Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  Steve 4 years ago.

  • Author
    Posts
  • #5846

    akforsyt
    Participant

    I’ve been watching Piklist for a few years now and finally decided to jump in and start using it. One of the biggest draws was the add_more functionality. I am trying out 0.9.9.7 and ran into an issue.

    This is for a front-end form. I’m trying to add an HTML field inside an add more but get a JS error when I do so.
    Uncaught TypeError: $(…).data(…).replace is not a function
    Because of this error, I cannot use the add more to add another section.

    Here is the Piklist code I am using. It’s from a forum post Steve made.

    piklist('field', array(
      'type' => 'group'
      ,'field' => 'reg_notes'
      ,'add_more' => true
      ,'label' => 'Notes'
      ,'description' => 'You can add private notes below for internal reference that only team members will see.'
      ,'fields' => array(
        array(
          'type' => 'html'
          ,'field' => 'note_author'
          ,'value' => $current_user->display_name
          ,'columns' => 3
        )
        ,array(
          'type' => 'html'
          ,'field' => 'note_date'
          ,'value' => date("m/d/y")
          ,'columns' => 2
        )
        ,array(
          'type' => 'textarea'
          ,'field' => 'note_text'
          ,'columns' => 7
          ,'attributes' => array(
            'placeholder' => 'Your Notes'
          )
        )
      )
    ));

    It appears to be the same issue posted here: https://piklist.com/support/topic/add_more-issues/#post-1732

  • #5850

    Steve
    Keymaster

    @akforsyt– Welcome to the Piklist community!

    That issue you linked to was resolved a while ago. Please try changing to a default WordPress theme and disable other plugins to see if there is a conflict.

  • #5911

    akforsyt
    Participant

    Thanks Steve. It’s working perfectly now with all the same add-ons enabled and the same theme. I’m not sure what I changed, but you are correct that this is working in 0.9.9.7.

    Thanks!

  • #5916

    Steve
    Keymaster

    Great! Closing ticket.

The topic ‘add_more HTML issue’ is closed to new replies.