• Resolved fatih71

    (@fatih71)


    Hello,

    <script>
    
    fbuilderjQuery(document).one('showHideDepEvent', function(i){
    fbuilderjQuery.getJSON('https://opendata.rdw.nl/resource/m9d7-ebf2.json?kenteken=33DBBL', function(data)
    {
    fbuilderjQuery('[id*="fieldname1_"]').val(data[0]['merk']);
    fbuilderjQuery('[id*="fieldname3_"]').val(data[0]['handelsbenaming']);
    
    } );
    });
    </script>

    I want to change 33DBBL by an inputfield. How to do this?

    thank you,
    Fatih

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

    (@codepeople)

    Hello @fatih71

    Assuming the input field is the fieldname123, the process would be similar to the content of your function:

    fbuilderjQuery('[id*="fieldname123_"]').val()

    Best regards.

    Thread Starter fatih71

    (@fatih71)

    <script>
    fbuilderjQuery(document).one(‘showHideDepEvent’, function(){
    fbuilderjQuery.getJSON(‘https://opendata.rdw.nl/resource/m9d7-ebf2.json?kenteken=fbuilderjQuery(‘%5Bid*=”fieldname1_”%5D&#8217;).val()’, function(data){

    fbuilderjQuery(‘[id*=”fieldname3_”]’).val(data[0][‘merk’]);
    fbuilderjQuery(‘[id*=”fieldname5_”]’).val(data[0][‘handelsbenaming’]);} );});
    </script>

    i have replaced with the code you gave but it does not work. Maybe i did not understand. Thank you.

    Plugin Author codepeople

    (@codepeople)

    Hello @fatih71

    You need to concatenate the field’s value and the URL:

    fbuilderjQuery.getJSON('https://opendata.rdw.nl/resource/m9d7-ebf2.json?kenteken='+fbuilderjQuery('[id*="fieldname1_"]').val(), function(data)

    The plugin support does not cover the implementation of the users’ projects. Your questions are not about our plugin. If you need additional help implementing the project, do not hesitate to contact us through our private website: Click Here

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘fbuilderjquery.getJSON() and input field’ is closed to new replies.