Hello,
I am using a form that allow the user (on the front-end) to add a specific type of event to a JS calendar (FullCalendar).
Everything works, except one thing. When I click the "Add" button, to add the event on the selected date, the page reloads (since I am using <cms:redirect k_page_link /> ), but the event is not added right away to the calendar/page.
I must manually refresh the page, and then it will be displayed.
Here's my form code:
Is there a way to make it that once it reloads the page, the page gets updated right away without me having to refresh the page? I am using that method in the admin panel too in a page (using custom admin theme) and it does the same thing. I always have to refresh the page manually to see the changes on the page.
Thanks a lot!
I am using a form that allow the user (on the front-end) to add a specific type of event to a JS calendar (FullCalendar).
Everything works, except one thing. When I click the "Add" button, to add the event on the selected date, the page reloads (since I am using <cms:redirect k_page_link /> ), but the event is not added right away to the calendar/page.
I must manually refresh the page, and then it will be displayed.
Here's my form code:
- Code: Select all
<cms:form
masterpage="hold.php"
mode='create'
anchor='0'
method='post'
enctype='multipart/form-data'
>
<cms:if k_success>
<cms:db_persist_form
_auto_title="1"
_invalidate_cache = '0'
start_date_test=frm_start_date_test
conferencier_dropdown=k_page_id
/>
<cms:redirect k_page_link />
</cms:if>
<cms:if k_success >
<cms:set_flash name='submit_success' value='1' />
<cms:redirect k_page_link />
</cms:if>
<span style="color:#333;">Ajouter un HOLD :</span><br>
<cms:input name='start_date_test' type='bound' />
<button class="w-button" onclick="this.form.submit()">Add</button>
</a>
</cms:form>
Is there a way to make it that once it reloads the page, the page gets updated right away without me having to refresh the page? I am using that method in the admin panel too in a page (using custom admin theme) and it does the same thing. I always have to refresh the page manually to see the changes on the page.
Thanks a lot!