close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

use DataAssist to create a dynamic radio group?

Thread began 6/18/2010 9:50 am by sandy170299 | Last modified 6/21/2010 5:01 pm by Eric Mittman | 1342 views | 3 replies |

sandy170299

use DataAssist to create a dynamic radio group?

Can DataAssist be used to create a dynamic radio group, using the values from a MySQL table? I thought I could create a dynamic search using DataAssist and choosing radio group, but it only inserted static values, nothing from the database. This is what I have so far and it's not working:

<form action="" method="POST" name="form1" id="form1">
<?php do { ?>
<input name="fruitID" type="radio" value="<?php echo $row_getFruit['fruitID']; ?>" />
<?php echo $row_getFruit['fruitName']; ?><br />
<?php } while ($row_getFruit = mysql_fetch_assoc($getFruit)); ?>
</form>

What have I done wrong?

Sign in to reply to this post

Eric Mittman

This looks to be a dynamic radio group to me. It is within a loop that is based on a recordset and that same recordset is referenced for the value:

$row_getFruit

So long as this recordset has values it should create the options for you. What are you experiencing?

Sign in to reply to this post

sandy170299

Finally got it to work. But why doesn't DataAssist search create dynamic radio groups? I tried using it, and all I got was static radio buttons, which I would have needed to populate manually.

<form action="sresults.php" method="post" name="sform" id="sform">
<table width="600" border="0" cellpadding="5" cellspacing="0" bordercolor="#ffffcc">
<tr>
<td width="147" valign="top"><div align="right">Select your Fruit</div></td>
<td width="427" valign="top">
<div align="left">
<?php do { ?>
<input name="fruitID" type="radio" value="<?php echo $row_getFruit['fruitID']?>" />
<?php echo $row_getFruit['fruitName']; ?><br />
<?php
} while ($row_getFruit = mysql_fetch_assoc($getFruit));
$rows = mysql_num_rows($getFruit);
if($rows > 0) {
mysql_data_seek($getFruit, 0);
$row_getFruit = mysql_fetch_assoc($getFruit);
}
?>
</div></td>
</tr>
<tr>
<td valign="top"><div align="left"></div></td>
<td valign="top">
<div align="left">
<input name="submit" type="submit" value="submit" />
</div></td>
</tr>
</table>
</form>

Sign in to reply to this post

Eric Mittman

DataAssist will create the search form for you with the inputs you specify but this is as far as the wizard takes it. You need to craft the recordsets to populate these inputs on the search form if you want them to be dynamic.

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