close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Dependent form fields not inserted correctly.

Thread began 5/27/2021 1:40 pm by Jonas | Last modified 5/28/2021 8:47 am by Jonas | 17 views | 3 replies

Jonas

I created this rule from Access Rules Manager.

Instead of the following code that triggers the insert records:
"… If (isset ($ _ POST [" bucketAddTips "]) || isset ($ _ POST [" bucketAddTips "]))…",
which in plain language means: "if the button called 'bucketAddTips' is pressed", I added this rule ((WA_Auth_RulePasses ("add bucket approved")), so that it instead became:
”… If ((WA_Auth_RulePasses (" add bucket approved ")) && (isset ($ _ POST [" bucketAddTips "]) || isset ($ _ POST [" bucketAddTips ”])))…”
which in plain language means: "if the select list called 'approvedChoice' is equal to 1, and if the button called 'bucketAddTips' is pressed". But this does not seem to help. It is still not possible to send the form if the selection from the select list is 0. So I suspect that this rule that I added has no effect? But it would have been interesting to know if the code is written correctly?

———

I realize that my question is complicated, so I will try to be as clear as I can. Here I clarify how I intended.

I have three tables in the database that the current form should write to. "BucBuckets", "bucBucketsLan" and "bucTipsAdmin".

If the selection in the select list is equal to 1, the contents of the form are written to all three tables. But if the selection is equal to 0, the content should only be written to table "bucTipsAdmin". Because the field shown is linked to that table, see below (reason).

I have created a select list where the choice you make affects what you can fill in afterwards.
Technically, I have used a javascript that I modified (see: https://www.solodev.com/blog/web-design/how-to-hide-form-fields-based-upon-user-selection.stml).
If you select "Approved" (1), several fields are displayed.
But if you select "Not approved" (0), only a text field: "Reason", is displayed.

If you think that "not approved" is selected and you fill in "Reason" (which is required), and press send - then the content should be written to the table bucTipsAdmin. But this does not work. The button does not work.

If, on the other hand, you think that "approved" is selected and you fill in the fields that are required, and press send - then everything is written correctly.

I suspect that instead it has something to do with the validation. That it collides in some way?

I do not know if I do everything too complicated. If you have any simpler suggestions on how to build this functionally, I would be grateful.

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...