close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert and add similar, I want to save data for recurring event and just enter the new date for events with similar info

Thread began 6/24/2020 2:38 pm by jo271221 | Last modified 6/29/2020 1:25 pm by Ray Borduin | 960 views | 14 replies |

jo271221

Insert and add similar, I want to save data for recurring event and just enter the new date for events with similar info

I have an events calendar where users can enter events. Many of the events are series which are held at the same location and have the same data including event flyer. I would like to add an option to my create event where the user can click Add Event OR Add Event and add another date for this series.

Sign in to reply to this post

Ray BorduinWebAssist

The easiest solution is to add a "duplicate" button in the results next to the update button. The duplicate page is just a copy of the update page but it does an insert instead of an update.

Sign in to reply to this post
Did this help? Tips are appreciated...

jo271221

Thank you, Once I add the duplicate button what code do I need to add to insert the info and return to insert another record. I guess a copy of the add event page which mirrors the update however I am unsure how to proceed.

Sign in to reply to this post

Ray BorduinWebAssist

Copy the update page, rename it to duplicate. Then remove the update server behavior and add an insert server behavior in its place.

Sign in to reply to this post
Did this help? Tips are appreciated...

jo271221

Thank you, now for the form fields. I am attaching the page.
I obviously want the user to be able to view the previously entered data. Then I just want them to be able to update any fields they wish which in most cases will just be the date.

Sign in to reply to this post

Ray BorduinWebAssist

If you start with the update page then it would automatically pre-fill the form just like it does on the update page. Just make sure the postid value for the post you are duplicating is passed in the url when you go to the duplicate page like: duplicate-race.php?postid=1234

Sign in to reply to this post
Did this help? Tips are appreciated...

jo271221

Ok, Thanks. The form part actually is working, the data is retained. The datepickers are not working (you can type in the date but the calendars do not pop up) and it is not inserting a new event.

Sign in to reply to this post

Ray BorduinWebAssist

Your button is still named "Update" but your insert trigger is "Insert" button pressed.

Does the datepicker work on the Update page? You must have changed something because simply renaming the page wouldn't cause them to stop working. Usually it is a javascript error on the page that prevents it from working... perhaps if I had a url to look at I could spot it.

Sign in to reply to this post
Did this help? Tips are appreciated...

jo271221

Plz see private msg

Sign in to reply to this post

Ray BorduinWebAssist

You had an include at the bottom of the page _js.php that re-loads the jquery library, but doesn't load the jquery_ui library, so it removed the datepicker functionality.

I've fixed the issue on the duplicate page by removing the repeated jquery includes and moving the script below the _js.php include so it loads after the jquery library loads. I also updated _js.php to include jquery_ui.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...