Please note that Form2Content is no longer being developed. All files from the latest version can be found on Github.

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. John Dunstan
  2. F2C field types
  3. Sunday, 30 November 2014
  4.  Subscribe via email
Hello,

I am really loving Form2Content so far!

I am using Form2Content to build and Events directory, however there is one downfall which has my project at a standstill (i emailed support over a week ago...havent had a response yet)...

Since I am creating an Events directory, I have added Date Picker Fields with 'Event Start Date' and 'Event End Date'.

I need to be bale to set a menu item in joomla frontend, set blog category listing, and have the events listed by the 'date picker field' 'event start date'.

It seems from reading your documentation that the only field we can't sort by is the 'date picker field'.

Given this, can you give me an indication if you are/can add the feature to sort/filter by the date picker field?

Also, is there any other way you can advise to achieve what i need? Perhaps some php and set a template html overide for a specific joomla category?

Any and all help would be appreciated.

P.S. Events will be added by many different staff members at our business AND events will be added by our clients and media partners...so we can't just manually sort Joomla articles in the joomla backend.

Thanks again,
Accepted Answer
Accepted Answer Pending Moderation
Hi John,

In the latest F2C Search Release (6.3 and above) you can now create a drop down with "time range" (like months) based on date input via the F2C Date field type.
Since it's based on php you can programme your own functionality. The month example is included.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # Permalink
Responses (29)
Accepted Answer Pending Moderation
Hi John,

This is the email I send you on 26-11-2014 at 16:36, less than a day after you asked for support:


Hi John,

Form2Content actually has no control over the com_content blog layout. We "just" create the Joomla articles. It might be possible using a Joomla template override and adding the logic with php in it but I'm not sure as I'm not a programmer.

You might use the status option "archive" for events that have past. However you would need your own php and a cron to automatically test every day to see if an event has taken place and change the state.

For now the only option is to set the blog to ordering and moving the articles in the order you want. Sorry I can't be of more help.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 1
Accepted Answer Pending Moderation
Hello,

1) Do you plan on adding the ability to filter by the date picker field in your 'search component - Filtered Article List Manager'?

If so, any idea when?

2) Form2Content allows us to add the default Joomla Artcile Meta Description and Meta Keywords to our Frontend Submission form...Is there a way to show the default Joomla 'date added' field in the Frontend Submission form (or any of the default Joomla date fields)?

Thanks
  1. more than a month ago
  2. F2C field types
  3. # 2
Accepted Answer Pending Moderation
Hi John,

Please always add your version information!

1) We are currently developing plugin based field types for F2C. This means that F2C Search development is very limited. However I also like to see the date search feature but cannot say when this will be developed.

2) This is already possible. In the content type configuration (first tab) you can set which date fields to show in your form. Also the featured option, user, language etc.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 3
Accepted Answer Pending Moderation
I cant believe I asked you about no.2 from above (the date created field) i already knew this!!! There are so many projects I work on, and simple little things just slip by the old brain!

Ok...regarding my original request...being able to use the 'search component - Filtered Article List Manager' to sort by the 'date picker' field'

How much would you quote me to create this feature if I paid for it? (and projected timelines?)

Please let me know,

Thanks,

John
  1. more than a month ago
  2. F2C field types
  3. # 4
Accepted Answer Pending Moderation
Hi John,

I will ask Julien to contact you regarding the F2C Search development.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 5
Accepted Answer Pending Moderation
Hello Patrick,

Any further info on:

1) if you have had time to start work on OR implement this sort for calendar/date picker field?

2) cost to create this feature?

Thanks,

John
  1. more than a month ago
  2. F2C field types
  3. # 6
Accepted Answer Pending Moderation
Hello,

I see you have added the ability to filter by date:

http://documentation.form2content.com/f2c-extensions/f2c-search

I have no php skills. Could you possibly give me some example code that I could enter into the 'php script' area.

My date field is called 'event_start_date' if this helps?

Thanks,
  1. more than a month ago
  2. F2C field types
  3. # 7
Accepted Answer Pending Moderation
Hi John,

Please see the example code in F2C Search. Create a new search field for the date field and find the example code afterwards.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 8
Accepted Answer Pending Moderation
I have already done this, but it doesnt work, thus why I am contacting you.

I added the example code:

$tmpDate = new JDate();
$filterDate = $tmpDate->format('Y-m-d');


I have no clue what the code means, or even if i have to modify it or add to it (thus why I am contacting you)..but either way, it is not filtering my content via event start date field.

Please advise
  1. more than a month ago
  2. F2C field types
  3. # 9
Accepted Answer Pending Moderation
OK John,

Please understand that we can only help if you give us all the info. I cannot guess you tried it!

Second, are you using the Date Interval field?
Third, are you using the latest F2C Search version and WHICH version.

Last, the example code looks like this:

$currentYear = date('Y');

for($monthCounter = 1; $monthCounter <= 12; $monthCounter++)
{
$firstDay = new JDate($currentYear.'-'.$monthCounter.'-01');
$lastDay = date('Y-m-t', strtotime($firstDay->format('Y-m-d')));

$intervalDates[$firstDay->format('Y-m-d').'|'.$lastDay] = $firstDay->monthToString($monthCounter);
}


You can simply copy/paste it and see what happens.

Last, does your F2C search module work in the front-end? With other fields?

PLEASE, we like to help but need information to do so! It's a CCK and we cannot guess what you like to build with it.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 10
Accepted Answer Pending Moderation
Hello,

I am using all of your latest versions:

Form2Content 6.10.0
Form2Content Search 6.4.0

I see no 'Date Interval Field'...just the 'Date Picker' Field.

The example code I gave before is what Form2Content generated as example code, but yes it looks different to the code you sent.

I have not tried the Form2Content search module...All I am doing is: Menu item > Form2Content Search > Filter Article List (options tab: Filtered Article List > Events by date list

I can provide logins if you want to take a look, its just a test site.

Thanks,

John
  1. more than a month ago
  2. F2C field types
  3. # 11
Accepted Answer Pending Moderation
When I add the code you supplied above, I get the following error:

Parse error: syntax error, unexpected 'format' (T_STRING), expecting ';' in /home/inspirm/public_html/dev/directory/components/com_form2contentsearch/libraries/form2contentsearch/field/date.php(123) : eval()'d code on line 3
  1. more than a month ago
  2. F2C field types
  3. # 12
Accepted Answer Pending Moderation
You are not working in the correct location!!

Please read the documentation on Filtered Article lists. You FIRST need to define a SEARCH!

Menu item > Form2Content Search > Search Form manager

AGAIN, what do you want to accomplish. HOW do you want to search on date (many different ways possible)!
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 13
Accepted Answer Pending Moderation
I have already done all of that, thats how I was able to arrive at the example code above, and thats why I had the option under the menu item tab to select 'Events by date list'

What I want to accomplish is already listed at the top of this thread, thats why i didnt start a new thread, thought it would be helpful for others like me to have it all in one place?
  1. more than a month ago
  2. F2C field types
  3. # 14
Accepted Answer Pending Moderation
Hi John,

Why do you need the filtered article list?

If you have added the Date interval field in the search. You can now add a Search module and it should display a drop down of the current year in months. So if your date value is 8th of August and you select August in the drop down you should get at least 1 search result.

AND Again (sorry) if you do not tell me what you have done already I cannot guess it!

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 15
Accepted Answer Pending Moderation
John,

WHY are you working withe the Filtered Article List functionality??????

YOU want a drop down search with months, based on a date input correct? Than follow what I wrote before!

I do not see the Date Interval search defined in you print screens. So

1) Menu item > Form2Content Search > Search Form manager
2) Add new, select Date Interval
3) Select YOUR field name and add the example code
4) Go to module manager
5) Add search module and select the search you defined in the component and publish
6) Go to the front-end and see the search module with month drop-down

When you say:

"its just NOT filtered by Event Start Date"

Do you mean ORDERED BY?

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 17
Accepted Answer Pending Moderation
no i dont want a drop down search with months.

As per my first post in this thread:

"I need to be bale to set a menu item in joomla frontend, set blog category listing, and have the events listed by the 'date picker field' 'event start date'."

IE: People click on a 'menu item' called 'Events'. This then loads a page that shows all my events in Category Blog layout filtered by Event Start Date field.
  1. more than a month ago
  2. F2C field types
  3. # 18
Accepted Answer Pending Moderation
OK.... now I understand our miscommunication

FILTER = You only show articles based a value (filter)

ORDERED = you show articles in an order, in your case based on the date field

SOLUTION

Go to the Search Manager and define custom ordering.
1) Set "display ordering" to yes (second tab)
2) In the 3rd tab set "custom ordering" to yes
3) Set default ordering to :

YOURFIELD_ID;ASC;Order by date;DATE

Hover over the field name to get more example codes

PS, next time just begin with:
"I need to be bale to set a menu item in joomla frontend, set blog category listing, and have the events listed by the 'date picker field' 'event start date'."

Even if you have said it somewhere, saves us all a lot of time when we know what you want to do ;)


Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C field types
  3. # 19
Accepted Answer Pending Moderation
Ok,

So before I started posting here, I tried that FIrst, and it didnt work. sorry!

EDIT: just to clarify terminology.

1) second tab, you mean 'Show Ordering'? If so, I dont want to show the ordering drop menu on this page..do i need to have it?

2) when you quote YOURFIELD_ID;ASC;Order by date;DATE...When you say YOURFIELD_ID..do you mean the ID (as in the ID number) or do you mean the your filed NAME? (ID in joomla refers to the number ID)

EDIT 2: What code should I be putting in the Components > Filtered Article List Manager > Events By date list > fields > Event Start Date > php script?
  1. more than a month ago
  2. F2C field types
  3. # 20
  • Page :
  • 1
  • 2


There are no replies made for this post yet.
However, you are not allowed to reply to this post.