cookn22
Active Member
I've been trying to figure out how to use Ajax based on what's provided in user_ajax_example.php but I'm not having much luck. I successfully got the provided example to work, so I know I have everything set up correctly. Honestly, all this ajax stuff is greek to me...What I'm trying to do is have a button in a form that updates the value of a field with a value in a database table when its clicked. The idea is to ask the user of the form whether they want previously entered form values copied over into the fields.
Here's the form:
And...that's as far as I've gotten. I'm kind of lost as to how to do this.
Here's the form:
Code:
<?php $group = $this->groups['update_placement - [joined to Client Update]']; ?>
<h3>
<a name="<?php echo $group->title;?>"><?php echo $group->title;?></a>
</h3>
<div class="fb_group" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
<h2><?php echo "Last Updated: " . $placement_last_update;?></h2>
<b><?php echo "Date: " . $placement_current_date;?>
<br>
<b><?php echo "Level: " . $placement_current_type;?></b>
<?php foreach( $group->elements as $element ){?>
<div class="fb_element" id="fb_element_<?php echo $element->int;?>"><?php if($element->error != ''){?>
<div class="fabrikerror"><?php echo $element->error;?></div>
<?php }?> <?php echo $element->label;?> <?php echo $element->element;?>
</div>
<?php }?>
<br>
<input type="button" name="fillplacefields" value "fill" onclick="InserFields()">
</div>
And...that's as far as I've gotten. I'm kind of lost as to how to do this.