cookn22
Active Member
I don't want to render the form, just get access to "$whatever->groups['..']->elements" and "$whatever->_data" and such in the same way you can normally do with "$this". In other words, I want to be able to get data from "$this" as per usual but also have another fabrikViewForm object as well. Is this possible? I've tried sticking this code in my custom template:
and doing <pre><?php print_r($attendance_view); ?></pre> spits out
There's no groups or elements in there, so I know I need to do some more stuff with $attendance_form, but I'm having a hard time figuring it all out.
Trying to think through how to use the formbot with what I'm trying to do makes my head hurt; I'm trying to put a customized form into the detailed view of another form that has multiple joins each with their own customized layout. It would be much easier if I could just get the elements and values straight from the other form.
Code:
<?php
global $database;
$attendance_form = new fabrikForm($database);
$attendance_form->load(29);
$attendance_view = new fabrikViewForm($attendance_form);
?>
and doing <pre><?php print_r($attendance_view); ?></pre> spits out
Code:
fabrikviewform Object
(
[_template] =>
[_errors] =>
[_data] =>
[_rowId] =>
[_params] =>
[_oForm] => fabrikform Object
(
[_tbl] => #__fabrik_forms
[_tbl_key] => id
[_error] =>
[_db] => database Object
(
[_sql] => SELECT *
FROM jos_fabrik_forms
WHERE id = '29'
[_errorNum] => 0
[_errorMsg] =>
[_table_prefix] => jos_
[_resource] => Resource id #15
[_cursor] => Resource id #472
[_debug] => 0
[_limit] => 0
[_offset] => 0
[_ticker] => 0
[_log] => Array
(
)
[_nullDate] => 0000-00-00 00:00:00
[_nameQuote] => `
)
[_admin] =>
[_aDataToIgnore] => Array
(
[0] => _frommodule
[1] => ids
[2] => option
[3] => act
[4] => task
[5] => tableid
[6] => Itemid
[7] => limitstart
[8] => pagelimit
[9] => limit
[10] => orderdir
[11] => orderby
[12] => sessioncookie
[13] => mosadmin
[14] => webfxtab_configPane
[15] => webfxtab_content-pane
[16] => PHPSESSID
)
[_reservedWords] => Array
(
[0] => _frommodule
[1] => act
[2] => task
[3] => option
[4] => form_id
[5] => Submit
[6] => ul_max_file_size
[7] => ul_file_types
[8] => ul_directory
[9] => tableid
[10] => rowid
[11] => Itemid
[12] => fabrik
[13] => addDropDownValue
[14] => addDropDownLabel
[15] => ul_end_dir
)
[_nullDate] => 0000-00-00 00:00:00
[id] => 29
[form_title] => Attendance
[record_in_database] => 1
[form_introtext] =>
[form_errmessage] =>
[created] => 2007-12-20 00:00:00
[created_by] => 62
[created_by_alias] => admin
[modified] => 0000-00-00 00:00:00
[modified_by] => 0
[checked_out] => 0
[checked_out_time] => 0000-00-00 00:00:00
[publish_up] => 0000-00-00 00:00:00
[publish_down] => 0000-00-00 00:00:00
[align] => left
[width] => 100%
[form_subject] => Attendance
[form_submit_message] =>
[form_submit_jumppage] => index.php?option=com_fabrik&task=viewTable&tableid=29
[email_to] =>
[email_from] => [email]ncook@uab.edu[/email]
[receipt_email] =>
[receipt_message] =>
[reset_button] => 0
[reset_button_label] => Cancel
[submit_button_label] => Save
[state] => 1
[table_id] => 29
[form_template] => bluesky
[view_only_template] => bluesky
[curl_code] =>
[attribs] => email_on_edit=0
receipt_title=
append_jump_ul=0
save_full_elname_in_session=0
remove_table_filtres=0
only_process_curl=
scrollnav=0
email_template=
email=
print=
[_elements] =>
[_groups] =>
[_table] =>
[_aJoinGroupIds] => Array
(
)
[_aDefaultFileTypes] => Array
(
[0] => .gif
[1] => .jpg
[2] => .png
[3] => .bmp
[4] => .doc
[5] => .xls
[6] => ppt
[7] => .swf
[8] => .pdf
[9] => .dcr
)
[_editable] => 1
[_enctype] => application/x-www-form-urlencoded
[_formName] =>
[_rootPath] =>
[_js] =>
[_validationRuleClasses] =>
[_specGroups] => Array
(
)
[_isModule] =>
[_isMambot] =>
[_aAttachments] => Array
(
)
[_err] =>
[_currentElement] =>
[_aJoinObjs] => Array
(
)
[_joinTableElementStep] => ___
[_joinDefaultData] => Array
(
)
[_params] =>
[_menuParams] =>
[_data] =>
[_postMethod] => post
)
)
There's no groups or elements in there, so I know I need to do some more stuff with $attendance_form, but I'm having a hard time figuring it all out.
Trying to think through how to use the formbot with what I'm trying to do makes my head hurt; I'm trying to put a customized form into the detailed view of another form that has multiple joins each with their own customized layout. It would be much easier if I could just get the elements and values straight from the other form.