+ Reply to Thread
Results 1 to 7 of 7

Thread: Set Default Hidden Data Entry Value

  1. #1
    Senior Member
    Join Date
    Mar 2019
    Location
    Philadelphia, PA, USA
    Posts
    112

    Set Default Hidden Data Entry Value

    Hi,

    How would I set a default value for a data entry without it being on the font end add listing page?

    I want to set the 'condition' data entry to default to 'used' but not allow the customer to change it.

    It defaults to used correctly when the data entry field is visible but won't set if it's not on the page. Plus, if I have the 'condition' data entry visible, the 'location' data entry is not selectable.

    Anybody have any ideas?

    Thanks,
    Jason

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    1,955
    Hello,

    you should set default value in your data entry: Common > Data Entries > your entry > Build > check 'Default' in front of your value

    or if it's listing field values select 'Default' in Field options

  3. #3
    Senior Member
    Join Date
    Mar 2019
    Location
    Philadelphia, PA, USA
    Posts
    112
    Hi Rudi, the default value is checked in the Build section of the Data Entry. It works fine as long as the corresponding field is visible on the add-listing page. However, when add-listing visibility is unchecked, the default value is not set for the listing. My workaround was to leave the Add to Listing Page option checked and putting the field into a group titled Hidden Fields which is hidden on the front-end via CSS.

    The other issue where if multiple Multifield Filter Data Entries and their corresponding dropdowns are on the Add Listing page, as soon as the Multifield nearest the top is selected, any remaining Multified dropdown is disabled. I temporarily bypassed this by editing the Multifield plugin to use checkboxes and only using one Multifield dropdown on the add-listing page, the others are now checkboxes and are not disabled.

  4. #4
    Hello Jason,

    Open file: ftp://plugins>>multiField>>static>>lib.js

    find code:
    Code:
    Only registered members can view the code.
    and replace to:
    Code:
    Only registered members can view the code.
    then find code:
    Code:
    Only registered members can view the code.
    and replace to:
    Code:
    Only registered members can view the code.
    save and check again.
    Viktor,
    Flynax technical department,
    Best wishes.

  5. #5
    Senior Member
    Join Date
    Mar 2019
    Location
    Philadelphia, PA, USA
    Posts
    112
    Hi Victor,

    Thanks, but the fields were still disabled after inserting those codes

  6. #6
    Are you sure you implemented my code and refreshed browser cache?
    Viktor,
    Flynax technical department,
    Best wishes.

  7. #7
    The code works, many thanks!

+ Reply to Thread