Copy link to clipboard
Copied
I'm building a kind of 'community events' webapp for a client - users will be able to submit an event - will be moderated/approved by client. I'm stuck on two things...
These are both to do with the 'Web app input form'.
I'm trying to set the expiry date for the day after the event - the only option seems to be never expire of number of days - I know I could write a little script that figures out the number of days between now and the event, add one and insert it into the nubmer of days field, but is there an easier way?
Secondly, when the webapp items are displayed on a page I need them to show the event that is closest to happening through to the event that is farthest away - showing by date will show by creation date, which isn't what I want. I was hoping to set the weight to the event date - ie 20121020 - for October 20, 2012 - but there isn't an option for weight on the 'Web app input form'. Any thoughts?
Cheers
Pat
Hey Pat,
Regarding the first question - I am afraid the only way to set the expiry date is to add X days to the current date, so calculating the number of days between the date you want the item to expire and the current days is the way to go here.
Regarding the second question I am afraid there is no "easy" way around this, weight values cannot be assigned through the front-end, so sorting is limited to the default options (date, datereverse, alphabetically and so on). One way I'd see this happen
...Copy link to clipboard
Copied
Hey Pat,
Regarding the first question - I am afraid the only way to set the expiry date is to add X days to the current date, so calculating the number of days between the date you want the item to expire and the current days is the way to go here.
Regarding the second question I am afraid there is no "easy" way around this, weight values cannot be assigned through the front-end, so sorting is limited to the default options (date, datereverse, alphabetically and so on). One way I'd see this happening is like so
-define a layout that renders all the webapps
-using js convert the event date to miliseconds and hide the events you do not want to show
There are some potential performance issues with this approach, if you need to display alot of items (with pictures for example) the system will load all the items every time and then hide the ones that are outside the desired range.
A more complicated way of rendering specific webapp items would be to create a "lightweight" list layout containing only the URL and the event date field (this should load up fairly fast) and then using ajax load only the needed items into the page. I would advise to use this approach in case you run into performance issues caused by loading the "detail" layout of the webapps.
Hope this helps,
Mihai.
Copy link to clipboard
Copied
Thanks Mihai,
Although not the answer I was hoping for, at least I know what is/isn't possible! Time to test my javascript skills!
Pat
Copy link to clipboard
Copied
Hi Mihai
Is there a reason why the weighting field is not available for the customer web app form?
It would be very useful to have.
Mark
Copy link to clipboard
Copied
I Second Mark and Pat's request for customer input control of release date and/or expiry date. Without that access, it is very hard to sort dated items (since the date sort is based on a field that is automatically assigned!)
Not sure how hard this is, but as you point out Mihai it would be much preferable performance-wise than a work around!
Copy link to clipboard
Copied
Is there any update or work around to having the release date accessible in the user input form for web apps?
I need the user to be able to set the release date so that the item does not display in the lists until that time...