• wolfenr

    (@wolfenr)


    Hi, I’ve been using Participants database for some while now and have been very happy with it and the support given from the Forum.

    I have, for some while now, an HTML field which basically puts an image with a hyperlink to basically scroll to the top of the page when clicked. The code that I had in the field had the following default values,

    <a title="Scroll to top" href="#scroll-top"><img src="https://www.cab.rogw.net/wp-content/uploads/2018/06/arrow-up.png" alt="" width="19" height="23" /></a>

    Has the way that HTML fields work changed or do I need to start again i.e. create a new field, add the default value and delete the old field?

    My thanks.
    Rog

    • This topic was modified 6 years ago by wolfenr.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author xnau webdesign

    (@xnau)

    It may be that the code is out of date when using the latest version of Participants Database. The code relies on the HTML being in the “values” parameter of the field, but the “values” parameter is no longer used, it was divided up into the “attributes” and “options” parameters.

    I haven’t tested this, but I suggest you first put your HTML into the “attributes” parameter of the custom field, then in the code in the get_html method on line 110, change $field_def->values to $field_def->attributes()

    This is not tested, but I need to update the tutorial code to something that works in the current plugin and I have not done that yet.

    Plugin Author xnau webdesign

    (@xnau)

    I’ve looked into this a bit further, and it looks like it won’t work at all in its current form. I had to tighten up the field sanitizing on the attributes, and so HTML tags are filtered out normally.

    I need to re-think how this can work, I’m sorry that this is going to be something that just doesn’t work for now.

    Thread Starter wolfenr

    (@wolfenr)

    Thanks @xnau, appreciate your interest.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML field stopped working’ is closed to new replies.