Download & Extend

Get default form values from user profile

Project:Public Bookings
Version:6.x-3.0-alpha2
Component:Public Bookings
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I'm trying to avoid that logged-in customers have to fill-in their details on every booking by adding some required fields in their profile upon registering.
I want these values to be the default value for the required values of the public bookings form.

This means I have to rewrite

$form['client']['last_name'] = array(
    '#title' => t('Last name'),
    '#type' => 'textfield',
    '#default_value' => $values['last_name'],
  );

in the module file. I'm an absolute PHP nitwit, so could anyone give me a hand on how to rewrite this piece of code so that logged in users don't have to fill this in anymore?

Big thanks in advance!
Piet

nobody click here