Jump to content

Javascript for adding and removing items to be reported


Recommended Posts

Ok, I’m new here so I hope will you will be patient with me.

I have the following problem: I want to make a sales form where every sale is of an arbitrary number of items, where the items range from A-Z.

(Each item can also only be sold once within each sale, but it would be acceptable to not enforce that).

I would like this portion of the form to look like this:

If I only have one item:

[buyer]

Item sold Color

[C] [Red] Add another item

If I have clicked â€Add another itemâ€:

[buyer]

Item sold Color

[C] [Red] Remove item

[] [] Add another item

where it should be possible to add an arbitrary number of items.

There is some relevant information here: http://howto.caspio.com/tech-tips/creat ... tions.html

My main problem with this solution is:

1. If I use this approach an item will not be removed, but only hidden. This means that it will actually be reported.

2. I would like to be able to report an arbitrary number of items.

I suppose the best approach is a javascript code, but I’m really weak in javascript programming.

I would be really grateful if anybody has a good suggestion for how to solve this.

Bjorn

Link to comment
Share on other sites

You may archive it using multiple deployment. Deploy two DataPages on your web page:

1. First one is a report, use predefined criteria, you may use timestamp field in the criteria, so you will be able to see only records submitted today (comparison type today), enable delete record on the Search results options wizard screen, you may also enable editing, if you want.

2. Bellow it (or above, as you wish) deploy submission form.

So, after each submission, record will be added to the report, and you will be able delete it (or update).

Or, you may simply use a report with inline insert enabled.

Hope this helps.

Link to comment
Share on other sites

You may archive it using multiple deployment. Deploy two DataPages on your web page:

1. First one is a report, use predefined criteria, you may use timestamp field in the criteria, so you will be able to see only records submitted today (comparison type today), enable delete record on the Search results options wizard screen, you may also enable editing, if you want.

2. Bellow it (or above, as you wish) deploy submission form.

So, after each submission, record will be added to the report, and you will be able delete it (or update).

Or, you may simply use a report with inline insert enabled.

Hope this helps.

Nice! Thanks for your suggestion.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...