close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Relational table insert, only if one of checkbox is ticked

Thread began 5/18/2017 2:09 pm by Kumel | Last modified 5/22/2017 1:23 pm by Ray Borduin | 1227 views | 6 replies |

Kumel

Relational table insert, only if one of checkbox is ticked

i have added relational table behaviour to a page. On clicking submit all records are submitted irrespective of certain selection ie. radio boxes.

So i want those records to be added when one of the radio is ticked.
Screenshot added.

So whenever any radio is ticked for each row then it must enter data.
So if i have ticked only one radio then 1 record must be entered not the rest

Sign in to reply to this post

Ray BorduinWebAssist

Can I see a copy of the page? It should be possible, but I'd have to look at how your form elements are named and how you have it applied to comment on what to change.

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

Kumel

file attached..

1386 line:

<p>
<label>
<input <?php if (!(strcmp($row_QuestionTextArea['SAType'],"C"))) {echo "checked=\"checked\"";} ?> type="radio" name="SAType_<?php echo $RepeatSelectionCounter_4; ?>" value="C" id="SAType_0_<?php echo $RepeatSelectionCounter_4; ?>" />
Clear</label>

<label>
<input <?php if (!(strcmp($row_QuestionTextArea['SAType'],"P"))) {echo "checked=\"checked\"";} ?> type="radio" name="SAType_<?php echo $RepeatSelectionCounter_4; ?>" value="P" id="SAType_1_<?php echo $RepeatSelectionCounter_4; ?>" />
Pending</label>



<label>
<input <?php if (!(strcmp($row_QuestionTextArea['SAType'],"D"))) {echo "checked=\"checked\"";} ?> type="radio" name="SAType_<?php echo $RepeatSelectionCounter_4; ?>" value="D" id="SAType_2_<?php echo $RepeatSelectionCounter_4; ?>" />
Deviate</label>


</p>



Its related relational codes : Line 200:

// WA DataAssist Manage Relational Table 2
if (isset($_POST["submit"]) || isset($_POST["submit_x"])) // Trigger
{
$WA_arrayOrFieldList = 1;
$WA_joinLoopedField = "SAQASID";
$WA_loopedField = "WADA_RepeatID_QASID";
..
..
...
Sign in to reply to this post

Ray BorduinWebAssist

I think you can probably manually add some code to do this on line 237.

I think you can update it to:
if (WA_AB_checkLoopedFieldsNotBlank(array("SAType"), $WA_mrtLoopCounter) && WA_AB_checkLoopedFieldsNotBlank(array($WA_joinLoopedField), $WA_mrtLoopCounter) && WA_AB_getLoopedFieldValue($WA_loopedField, $WA_mrtLoopCounter) == WA_AB_getLoopedFieldValue($WA_joinLoopedField, $WA_mrtLoopCounter)) {

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

Kumel

Parse error: syntax error, unexpected $end in /home/content/39/10368039/html/webgen/infideal/admin/be-application-details.php on line 1869...

I had made some changes in page all this time so lines might have changed.

My new file is attached here. Can you refer to me with this?

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you updated code on line 1388 when I said to update line 237.

Change that line back to what it was.

You should just be updating line 237 from:

if (WA_AB_checkLoopedFieldsNotBlank(array($WA_joinLoopedField), $WA_mrtLoopCounter) && WA_AB_getLoopedFieldValue($WA_loopedField, $WA_mrtLoopCounter) == WA_AB_getLoopedFieldValue($WA_joinLoopedField, $WA_mrtLoopCounter)) {


to:

if (WA_AB_checkLoopedFieldsNotBlank(array("SAType"), $WA_mrtLoopCounter) && WA_AB_checkLoopedFieldsNotBlank(array($WA_joinLoopedField), $WA_mrtLoopCounter) && WA_AB_getLoopedFieldValue($WA_loopedField, $WA_mrtLoopCounter) == WA_AB_getLoopedFieldValue($WA_joinLoopedField, $WA_mrtLoopCounter)) {
Sign in to reply to this post
Did this help? Tips are appreciated...

Kumel

it works. thanks a lot. You saved me from mess up!

Sign in to reply to this post

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