Hi,
First I should note that I am very new to web development! Therefore any help (and patience) would be very much appreciated.
I am attempting to create an custom node for users to create an 'event' page (say, for a squash ladder). I want the node to contain a table with details of the people taking part and their rankings etc. My problem is that I need to have a node for each event (or a custom entity if needed), but I also want a sub table elegantly tied to it.
So far I have thought through two possible ways of doing this, but I don't quite have the understanding to work out how to implement them / determine the correct approach.
The first approach I tried was to create a new database table based on a schema for each event, and a separate node for the event. The aim was to tie the two together by noting the table name as a field for the node, but this seems messy / possibly not very secure. Also, I have had trouble converting a form value to a new node field value.
I should note that this is very rough, so I haven't dealt with access permissions or other details yet.
function _ladders_add_form_to_database($form, &$form_state) {
global $user;
$user_id = $user->uid;
$new_table_name = t(str_replace(' ', '_','ladder_'.$user_id.'_'.$form_state['values']['ladder_name']));