1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice
  2. If you update to Joomla 3.9.16, you will have to update Fabrik from the latest GitHub version, to fix a bug introduced in Joomla, which makes it impossible to list front end folder locations in backend JForms. This affects things like template selection.
    Dismiss Notice

FYI. Found another place where '<' gets stripped

Discussion in 'Community' started by thellie, Aug 28, 2019.

  1. thellie

    thellie Member

    Level: Community
    I'm building a search form for our volunteer list. I already have a basic date field (startdate), among other options.

    What I am now trying to do is search on a date range - all records where the entered date sits on or between the startdate and enddate.

    This is a bit advanced for me, so I'm just messing around with different options, learning as I go. When I entered:
    Code (Text):
    ?vol_appform___startdate>=searchdate[value][]&vol_appform___Calculated_enddate<=searchdate[value][]&date[condition]=BETWEEN
    I noticed is that the '<' is getting stripped, so that after saving, the code then looks like:
    Code (Text):
    ?vol_appform___startdate>=searchdate[value][]&vol_appform___Calculated_enddate=searchdate[value][]&date[condition]=BETWEEN
    The '>' is not affected.
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Where are you doing this?
    Are you running a current GitHub update?
     
  3. thellie

    thellie Member

    Level: Community
    In Thailand... hahaha... seriously, I am.

    It's in the Extra Query String field in the Fabrik Form menu (Fabrik Form Options tab)

    I ran a full update from GitHub less than 2 weeks ago.

    Whether the code I'm fiddling with is correct or not is irrelevant in this topic AFAIK - all I'm doing is letting you know that the '<' is stripped in that field
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    But the < shouldn't be there.

    Code (Text):

    ?vol_appform___startdate>=searchdate[value][]&vol_appform___Calculated_enddate=searchdate[value][]&date[condition]=BETWEEN
     
    WHere you have >= should only be =. That's part of the query string syntax. The ? in a URL is followed by a set of key=value pairs, separated by &. I'm confused as to why you are trying to use > in there.

    -- hugh
     
  5. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I think you are getting confused, and thinking those = in that query string are to do with the condition, ie. you want "between", so are trying to do key>=value and key<=value. But that's not the case. The query string just sets what the values are, then the filter code applies "BETWEEN" to them.

    Note that query string syntax itself, the key=value separated by &, isn't a Fabrik thing, it's an HTTP thing.

    https://en.wikipedia.org/wiki/Query_string

    -- hugh
     
    thellie likes this.
  6. thellie

    thellie Member

    Level: Community
    "I Don't Really Know What I'm Doing" is my stock answer... :oops:

    </musttryharder>
     
    cheesegrits likes this.

Share This Page