validate_form_data

Located in: Located in: wpsc-user_log_functions.php
Version Introduced: 3.8

Description: This template tag is used on the users “My Account” page. You would use this tag within the form that allows the user to update their details (Billing shipping etc).

It will return an array of error messages if an error is found int he form otherwise an update message if the details have been updated.

Note: Use with

 wpsc_display_form_fields(); 

to generate the default form fields.

[php]

Code Example:
[php]
<!– START OF PROFILE PAGE –>
<?php if ( is_wpsc_profile_page() ) : ?>

<form method="post">

<?php echo validate_form_data(); ?>

<table>

<?php wpsc_display_form_fields(); ?>

<tr>
<td></td>
<td>
<input type="hidden" value="true" name="submitwpcheckout_profile" />
<input type="submit" value="<?php _e( ‘Save Profile’, ‘wpsc’ ); ?>" name="submit" />
</td>
</tr>
</table>
</form>

[/php]