Build with IDX Broker Forums Developer Resources How to remove option values in advanced fields?

Viewing 2 reply threads
  • Author
    Posts
    • Nick Leech
      Keymaster
      Post count: 37

      As a developer I have clients ask me a lot of the times how to remove option values from showing in some of the advanced fields.

      Is there a piece of JavaScript code I could alter in order to remove certain option values from showing in the advanced fields?

      0 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
    • idxforge
      Participant
      Post count: 31

      There’s a couple ways to do it, one easy with drawbacks, and one less easy. the easy method is with some javascript to rewrite the field and only include the options you want to include, i have a script like that which i just used for a client last week. the drawback is that it will become static and wont change with the active data the way fields do in idx search pages. the other method (i think, this i’m less sure of) would be to pull it all from the api and rebuild the whole search page. this way you can control what options are visible and it retains it’s ability to show new options according to what is currently active in the data.

      anyone correct me if i’m wrong.

      0 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
    • idxbroker
      Keymaster
      Post count: 179

      Javascripting works on advanced search pages to re write the DOM (after the ajax loads) or you can create your own custom search page. Then you have complete control of the option values. Both methods could use the API version 1.1.1 to update and cache advanced search option values.

      0 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
Viewing 2 reply threads
  • You must be logged in to reply to this topic.