• Resolved coolandcoco

    (@coolandcoco)


    Hello, when I enter JS in the table to create a hyperlink, the plugin adds an unwanted space just after the quote $(‘[data-id=” which makes the execution buggy:

    $(‘[data-id=”radio_field_id_2″]’) becomes

    $(‘[data-id=” radio_field_id_2″]’)

    Any idea how to fix this?

     <a href="javascript:void(0)" onclick="jQuery(document).ready($ => {
          $('[data-id="radio_field_id_2"]')[0].__vue__.value = "1_0"  ;
        });">Push</a>
Viewing 1 replies (of 1 total)
  • Plugin Contributor Kim L

    (@kimmyx)

    Hi @coolandcoco,

    Your script closes after [data-id=” because it’s closing the whole string with the double quotes (“). Try using single quotes in your script instead.

    For example:

    <a href="javascript:void(0)" onclick="jQuery(document).ready($ => {
          $('[data-id='radio_field_id_2']')[0].__vue__.value = '1_0'  ;
        });">Push</a>

    Let us know if this works. ??

Viewing 1 replies (of 1 total)
  • The topic ‘Unwanted space with JS code’ is closed to new replies.