• Resolved mpbaweb

    (@mpbaweb)


    Hi
    I am on the DEMO site evaluating the Datasource implementation prior to upgrade to Developer version.

    I am trying to use Datasource fields to auto-populate my form. I am using simple comma delimited csv as my datasources

    Ok, so I can successfully populate a text DS with a field from my csv when the user enters his id (The key)

    What I then want to do is to also populate a dropdown which the user can override if they choose. The only way I can see to do this is to make a single column csv for the Dropdown DS values and use the value retrieved in the Text DS as the criteria in the dropdown DS – The dropdown DS only supports a single column datasource. This is fine and I can make this work.

    What I then want to be able to do is to HIDE the text DS field as this is just being used as a staging step. I am not able to do this. Can you tell me how to hide it?

    An altogether better implementation would be to allow multi-column sources for the Dropdown DS field so I could pass more than one criteria field to make the selection.

    • This topic was modified 6 years, 9 months ago by mpbaweb.
    • This topic was modified 6 years, 9 months ago by mpbaweb.
Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter mpbaweb

    (@mpbaweb)

    But it’s not though. By entering that in the condition, the dropdown box is then RESTRICTED to just the value retrieved by the condition. There is no way for the user to override this value. Back to square one. I am starting to believe this is just not possible within the functionality of the plugin.

    • This reply was modified 6 years, 9 months ago by mpbaweb.
    Thread Starter mpbaweb

    (@mpbaweb)

    Ok. I think I have solved the issue.

    There is a bug whereby the condition does not recalculate when it’s dependencies change, so if the user changes one of the key fields, then the condition that is passed to the dropdown does not recalculate.

    I have emailed you the exported cpfm file and the csv so you can check this yourself

    Plugin Author codepeople

    (@codepeople)

    Hello,

    I’m sorry, but I’ve not received the email. Please, zip the exported file, and send me it from the “contact us” page in my private website:

    https://cff.dwbooster.com/contact-us

    Best regards.

    Thread Starter mpbaweb

    (@mpbaweb)

    There is no facility for attaching a file on that page. I sent the email to [email protected]

    Plugin Author codepeople

    (@codepeople)

    Hello @mpbaweb,

    First, into the “Hull DropDown*” field, the condition cannot be simply <%fieldname19%> you should define it comparing with the records in the recordset field, as follows:

    
    record['rhull'] == '<%fieldname19%>'
    

    The condition into the “Transponder from DS” should be corrected too:

    
    record['rclubno']=='<%fieldname14%>' && record['rclass']=='<%fieldname15%>'
    

    Look the space characters between the different elements.

    Please, check the rest of conditions.

    Best regards.

    Thread Starter mpbaweb

    (@mpbaweb)

    Put those fixes in. Still doesn’t work. The dropdown now recalculates when the user changes his input, but is now back to being restricted to a single value returned by the condition. And the transponder field now retrieves nothing.

    It’s just not possible to do this is it?

    If you think you managed to make this work, then please send me the corrected cpfm file you used, as following your latest instructions is a step backwards from what I had already achieved.

    • This reply was modified 6 years, 9 months ago by mpbaweb.
    Plugin Author codepeople

    (@codepeople)

    Hello @mpbaweb,

    I’m sorry, the problem is that I really do not understand what do you want. If you are filtering the values in the DropDown field, will be available only the options that satisfy the filtering condition and not others. For loading other options is required modify the filtering values.

    Best regards.

    Thread Starter mpbaweb

    (@mpbaweb)

    Well that’s exactly it. I don’t want to filter the dropdown,I just want to preselect one of its values. All the necessary data is available to do this.
    It’s a really basic requirement to retrieve user data but allow them to override the values. I do not understand why such a simple requirement is so difficult to achieve

    • This reply was modified 6 years, 9 months ago by mpbaweb.
    • This reply was modified 6 years, 9 months ago by mpbaweb.
    Plugin Author codepeople

    (@codepeople)

    Hello,

    If you want to load all possible options in the DropDown DS field, and select by default the option whose value coincide with the value entered through the fieldname19 field, the solution would be:

    In the DropDown DS field settings:

    – Select the Recordset option as the Datasource.
    – Select the fieldname11 as the recordset.
    – Enter the column name for value and text, in your case: rhull
    – Let in blank the condition attribute.

    Now, insert a Calculated field in the form with the equation:

    
    (function(){
    jQuery('[id*="fieldname'+'17_"] [vt="'+fieldname19+'"]').prop('selected', true).change();
    })()
    

    As the calculated field is used as auxiliar, you can tick the checkbox for hiding the field from the public form.

    Best regards.

    Thread Starter mpbaweb

    (@mpbaweb)

    Together I think we have solved this now. I made the change you suggested and had the following result:
    The dropdown is not restricted to a single value now. GOOD
    The dropdown shows ALL values. BAD

    The dropdown should only show values that are appropriate to the class selected by the user. So I added a non-unique condition to the dropdown DS that filtered this:
    record[‘rclass’]=='<%fieldname15%>’

    The form is now working as expected.

    Thank you.

    • This reply was modified 6 years, 9 months ago by mpbaweb.
    Plugin Author codepeople

    (@codepeople)

    Hello @mpbaweb,

    Thank you very much for letting me know that everything is working now as you need.

    Best regards.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Hiding DS fields?’ is closed to new replies.