date field pre filled in search mask

2 months 1 week ago #76877 by mkoepf
Hi,

It wolud be great, if there will be an option, that a date field in all the search masks can be populated with the actual date or some other possibilities, not only with concrete date values.
That would help, if a date field is a criteria, that only items should be found with the date bigger or equal than the actual date for example.

Because I needed that feature, I made a small "hack":
I entered a fixed old date out of the past and use this as default value( 2016-10-06 for example).
Than I changed the code in components/com_flexicontent/classes/flexicontent.fields.php:
...
// CASE: range values: value01---value02
if (strpos($filter_value, '---') !== false) {
$filter_value = explode('---', $filter_value);
$filter_value[2] = $filter_value[1];
$filter_value[1] = $filter_value[0];
if ($filter_value[1]=="2016-10-06"){$filter_value[1]=date("Y-m-d");}
unset($filter_value[0]);
}
...
It works (certainly not, if a user searches exactly for that date ;) ), but as it is a hack, I have to do it again after each update of FC.
Is ist possible to integrate this in the code?
I think it should be only a smal change...

Hope to hear from you.

Best regards
Matthias

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76878 by micker
hello you can create a fork of flexicontent and after propose your modification via a PR
github.com/FLEXIcontent/flexicontent-cck
we will check this with pleasure

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76881 by mkoepf
Oh!
I have never done that before...
Could you do that for me...?
I think, it's only a very small change...

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76883 by micker
no i can't need to do more with this code
because 2016-10-06 can be used ... (not generic code)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76885 by mkoepf
you mean I should change the code in a way, that you can include it with no further changes?
I thought you would like to do that yourself to have the full control about the code and the quality and style of programming...

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76889 by ggppdk
Hello

i really see the usefulness of a specific parameter
but you can do it now yourself

2 general parameter exists for this already
- initial filter values
- locaked filter values

in your case you need the initial filter values
see the picture


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Attachments:

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76891 by mkoepf
yes, i think, thats exactly what I need. In which version was this feature added?
In the german translation this new and great feature is not visible!
So i did not know about it!

Thanks for your answer!

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76893 by micker
in actual version that in
you can add this in category option or override option in menu link

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76899 by mkoepf
Thanks. Yes, there it works fine.
I also need this functionality in a modul of the type "Content Lists Filtering".
There "now" is working, but "now-5d" for example is also returning the actual date. Subtraction or addition does not seem to work.
Could you please check this?

Please Log in or Create an account to join the conversation.

2 months 1 week ago #76900 by micker
becarefull with space .. i think it will good with now -5d

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.