Dear all...

I am a beginner in building drupal form.
and seeking, is there another subform module?
currently i found the "independent subform" such previewed in http://www.tcao.com/drupal/ .
wich is every subform has its own submit_button.

But we need is: A subform in a form, that each child dependent to that parent.
these will have no any submit button.

in other word, user may create some additional fields-set (form-item) at runtime

That form may look like:
----------------------------------------------------------------------
Employee Full Name :
[______________________]

Address :
[______________________]

Childrens :
Name: Age: Gender:                      [Add child] <-- add subform button. may via javascript.
[______________________] [______] (*)Male ( )Female
[______________________] [______] (*)Male ( )Female
[______________________] [______] (*)Male ( )Female

[Send form] <-- main and only one submit button
----------------------------------------------------------------------
Is there a module accomodates it? Hmmm,,
I am prying that somebody will help me as soon,,
A simple PHP trick i will love it; It not yet solved.

I am creating any form with CCK. but confused while build one with this situation.

Last year, I've implement with javascript like:

var subFormz = 3;
function addForm() {
  subForms += 1;
  var sf = document.getElementById('subForms');
  sf.innerHTML = sf.innerHTML + '<div style="display:block"><input type="text" name="names['+subforms+']" value="" size=60>&nbsp; 
<input type="text" name="ages['+subforms+']" value="" size="5">&nbsp; 
<input type="radio" name="gender['+subforms+']" value="0"  checked="checked">Male &nbsp;
<input type="radio" name="gender['+subforms+']" value="1" >Female </div>';

Okey thanks you reading.

Comments

MrTaco’s picture

it wouldn't be difficult to modify the current 0.30 distro of subform, such that the "Save" links that are currently in each child, would be gone

if that's what you are looking for, then i encourage you to go for it

as for subform itself, it is heading in the direction of more and smaller form posts

futures distros of subform will *require* an individual save/submit button for each child, or barring that, some fancy javascript that masks that need

MrTaco’s picture

Status: Active » Closed (works as designed)
x2nie’s picture

it was solved in Drupal 6.3

it was in POOL.module

no more, that is i need.

Thanks

fossie’s picture

What do you mean by POOL.module?

I'm looking for concept:
where I create a
-master content type with a few fields
-detail content type where I create from the master (view or edit) detailed content types.

Also important to let search index the master (content) information combined with the detailed content types linked to it.

Some information about it? Drupal 5 or 6 is ok.

TIA,
Fossie