Copy link to clipboard
Copied
In the web app search field "Date" should be the current date.
Has anybody an idea how to manage this?
i try to customize the DataPicker but without successs.
Actually this is my Code:
<form name="catcustomcontentform24647" method="post" onsubmit="return checkWholeForm24647(this)" action="/Default.aspx?CCID=16168&FID=125881&ExcludeBoolFalse=True&PageID={module_oid}">
<table class="webform" cellspacing="0" cellpadding="2" border="0">
<tr>
<td class="h4-texttitel"><select name="CAT_Custom_1" id="CAT_Custom_1" class="cat_dropdown">
<option value="*">-- Alle Themen--</option>
<option value="Gottesdienst">Gottesdienst</option>
<option value="Konzerte">Konzerte</option>
<option value="Konfprogramm">Konfprogramm</option>
<option value="Mittagstisch">Mittagstisch</option>
<option value="Jassnachmittage">Jassnachmittage</option>
<option value="Gespräche">Gespräche</option>
<option value="Erwachsenenbildung">Erwachsenenbildung</option>
<option value="Spiritualität">Spiritualität</option>
<option value="Kirchgemeindeversammlung">Kirchgemeindeversammlung</option>
</select></td>
<td><input type="text" name="CAT_Custom_2_Min" id="CAT_Custom_2_Min" class="cat_textbox" readonly style="background-color:#F0F0F0;" onfocus="displayDatePicker('CAT_Custom_2_Min');return false;" placeholder="mm/dd/yyyy"/></td>
</tr>
<tr>
<td><input class="cat_button" type="submit" value="Termine anzeigen" /></td>
</tr>
</table>
</form>
<script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js?vs=b2004.r486545-phase1"></script>
<script type="text/javascript" src="/CatalystScripts/Java_DatePicker.js?vs=b2004.r486545-phase1"></script>
<script type="text/javascript">
function checkWholeForm24647(theForm) {
var why = "";
if (theForm.CAT_Custom_2_Min)
if (theForm.CAT_Custom_2_Min.value.length > 0) why += checkDate(theForm.CAT_Custom_2_Min.value, "Datum");
if (theForm.CAT_Custom_2_Max)
if (theForm.CAT_Custom_2_Max.value.length > 0) why += checkDate(theForm.CAT_Custom_2_Max.value, "Datum");
if (why != "") {
alert(why);
return false;
}
return true;
}
</script>
Thanks for helping
I'm sure you still need this, but try to use global variables.
{% assign today= globals.site.dateNow | date -%}
and for the "CAT_Custom_2_Min" input add value={{today}}
Copy link to clipboard
Copied
I'm sure you still need this, but try to use global variables.
{% assign today= globals.site.dateNow | date -%}
and for the "CAT_Custom_2_Min" input add value={{today}}
Copy link to clipboard
Copied
‌this works fine. Do you have a tipp how to submit the form on load?
Copy link to clipboard
Copied
Web development is new to me, I'm not sure I understand your question, you want to automatically submit the form on page load?
Copy link to clipboard
Copied
If somebody visit the site, the web app results with the current date should be shown.
This is the reason why the webforms should be submitted automatically with the current date.
Copy link to clipboard
Copied
You will need javascript to do that.
Copy link to clipboard
Copied
with the following javascript the web form submit automatically the fields.
<script language="JavaScript">document.forms[0].submit();</script>
But it loops the submit-process, because the webapp results are on the same site.
Copy link to clipboard
Copied
The approach is that: the standard web app with filter "latest" doesn’t show the current item on the top.
{module_webapps id="16169" filter="latest"}
The visitor should always see the most actuall item on the top.
Perhaps liquid is the right choice ?!