Page Form

Help
Robert
2011-06-03
2013-04-25
  • Robert

    Robert - 2011-06-03

    Hi,

    I'm writting because I'm new in plomino and I have a few questions on trying to make a report and I think you could help me:

    1.) I have a page form with a selection list wich contains data from filled forms (like a list of ID's of filled forms), what I want to do is to get the document that corresponds to that ID when selecting one of those ID's of the list so I can work with all the fields of that document. If I select another ID of the list I want to get the corresponding document dynamically to work with his values.

    This is the formula of the computed selection list:

    db=plominoDocument.getParentDatabase()
    view=db.getView("allposicionesExclusivas")
    valueslist=
    return valueslist

    2.) I don't know if this is posible this way.

    Thanks. Best regards

     
  • Eric Brehault

    Eric Brehault - 2011-06-07

    Hello,

    Yes it is possible.

    If you need this behaviour to be dynamic, you need to use JQuery.
    And use JQuery into Plomino form is quite easy.
    You just need to add a computed for display richtext field containing the following formula:
    html="""
    <script>
    jq("#your_selectlist_id").change(function() {
    jq("#the_dynamic_zone").load(jq("#your_selectlist_id").value+" #content");
    });
    </script>
    <div id="the_dynamic_zone"></div>"""
    return html

    (this code is approximative, the idea is to bind the onchange event of your select to a function that will load the selected doc into a div (and we use " #content" so we do not inject the entire page but just the doc content zone)

    Eric

     
  • Robert

    Robert - 2011-06-08

    Ok I already have jquery installed, and I created the computed for dispaly richtext field.
    the ID of my selection list field is  "Client" so then the formula should be this way?

    html="""
    <script>
    jq("Client").change(function() {
    jq("#the_dynamic_zone").load(jq("Client").value+" #content");
    });
    </script>
    <div id="the_dynamic_zone"></div>"""
    return html

     
  • Eric Brehault

    Eric Brehault - 2011-06-16

    Hello,

    if the id is Client then the right jquery selector will be: jq("#Client")
    and not jq("Client")

    Eric

     
  • Robert

    Robert - 2011-06-16

    Hi,

    and the  the_dynamic_zone with what value should I replace it??

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks