Custom Field Default Value

This topic contains 8 replies, has 2 voices, and was last updated by  jahusdtc 6 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #429745

    jahusdtc
    Expired Member
    Post count: 162

    If I create a custom field and set default, I am not seeing that default selected.

    Is there something else I should be doing?

    For instance…have radiobutton custom field.
    None is the first field in the comma-delimited list of fields for the radiobuttons to show.
    In Default, I have put None (the word).
    BUT in the Edit Listing page, the NONE radiobutton is not selected.

    Should I put in 0 or 1 for array placement instead?

    I tried to search in the forums, but it seems to be too broad a topic. Sorry.

    #429752

    Alex Rollin
    Moderator
    Post count: 27815

    It works for me when I use ’16’ as default and ’16’ as the option in this list ‘1,12,14,16’

    #429824

    jahusdtc
    Expired Member
    Post count: 162

    Okay, Alex, I tried with a test field (less preconceptions than when using a “real” field) and you’re right!

    Using your test data, I DO see a 16 when DISPLAYING value in front end.

    When seeing the field during editing, however, the radiobutton for 16 is not “filled in.”

    This is intended?

    #429858

    Alex Rollin
    Moderator
    Post count: 27815

    When I add a new place, in either frontend and backend editors, without touching the custom radio field, it saves the default value.

    #429912

    jahusdtc
    Expired Member
    Post count: 162

    Ah, but what about existing places, where you add a new, defaulted set of values in a radiobutton?

    #429946

    Alex Rollin
    Moderator
    Post count: 27815

    Default value is set.

    #429968

    jahusdtc
    Expired Member
    Post count: 162

    So, you are saying, if I add your radiobutton sample of custom fields to existing listings, the radiobutton will be blacked in, as well as showing on, say, the Details page?

    #429976

    Alex Rollin
    Moderator
    Post count: 27815

    When I tested it was showing on detail pages of places I hadn’t edit since before I created the field.

    #430165

    jahusdtc
    Expired Member
    Post count: 162

    Okay, I repeated exactly your example — and it worked exactly as your said.

    (I actually tried before, but thought there was problem because I used the single quote when I put in the string of values, thinking I had done it wrong in the past — and it looked a little odd :})

    But…I have a thought. Maybe (and I honest cannot say because I don’t have a mental timeline on this) — possibly I changed the value of a listing in the radiobuttons.

    And I THEN set a default?

    That might not set value for everybody because in the database there WAS an EXISTING value for the field? And wouldn’t overwrite the existing value with the default. (That would make sense.)

    Anyway. One of my radiobuttons doesn’t have a black-dot in front of the default, one does.

    Not a killer, I was just trying to understand how it worked.

    When field displays in NON-editing form, it DOES show the default value. Really, that’s all I need. I just didn’t understand what I had done differently between the two fields!

    Alex, sorry I bothered you — and thank you for your perserverance! I will make sure I set a default in the future BEFORE I put in even a testing value.

    Maybe this will help someone in the future.

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount