javascriptnode.jstotal.js

JComponent global method GET doesn't work in Total.js Flow components


I have a problem in Total.js Flow using inside a component the client-side method GET to retrieve value of JComponent ( in my case textbox or input ). I have tried from Componentator and actually works, but inside my Total.js Flow ( version 6, but the 5 version has the same problem ) it return undefined. Someone know any solution or better way to retrieve for example on button click the value inside the input box?

<div class="row">
    <div class="col-md-12">
        <div data-jc="textbox" data-jc-path="url">@(URL)</div>
     </div>
 </div>
 <button onclick="getUrl()">Try</button>     // this call an example function that call the "console.log"


console.log(GET('url'));    // return undefined

Solution

  • Flow uses jComponent scopes in the form settings.NAME_OF_COMPONENT.path. So you can use GET('settings.name_of_component.url') or you can use a direct call like console.log(settings.name_of_component.url).