Appnitro Software Forums » MachForm

Can two forms use the same table?

(6 posts)

  1. Nedumaran
    Member

    I've created two forms. The second one has different labels and titles with a couple of fields less. It will be great if both these forms can write to the same table in the database. Is this possible?

    Alternatively, if it's possible for me to customise the form in code, I will not need two forms. For example, I need to change the labels, form title & description and hide a couple of fields.

    Appreciate any pointers.

    ~ MUTHU

    Posted 1 year ago #
  2. I'm afraid merge 2 form in 1 table won't possible. But you still can customize the form in code (edit "view-functions.php") and I think the best way for this is hide/show necessary field for each link. You can see this post to see how to hide/show a field :

    http://www.appnitro.com/forums/topic/dropdown-list-when-select-hide-input-type-text-field-or-disable?replies=9#post-6060

    Posted 1 year ago #
  3. Nedumaran
    Member

    Thanks, Redityo.

    I am calling my form using the following code:

    require("/path/to/machform/machform.php");
    	$mf_param['form_id'] = 1;
    	$mf_param['base_path'] = 'http://domain.name/machform/';
    	display_machform($mf_param);

    1. How do I pass parameters so that the form can be presented accordingly. For example, if param_a is set, I will hide certain fields.

    2. Can we add 'hidden' input fields to the form? It will be great if there is an option to add a hidden field in the form builder UI but to add it in code will serve the purpose for now.

    Appreciate if you could help me with these two q's.

    Regards,

    ~ MUTHU

    Posted 1 year ago #
  4. There is no hidden field type in the form builder, but you can add a javascript to hide some of your field when the form load to the page.

    Anyway, is it possible to send your form url in here ? so I can know which field do you want to hide ?

    Posted 1 year ago #
  5. Nedumaran
    Member

    Redityo, I'm still working on the form so it will keep changing.

    Can you please help me with (1) first ... i.e. passing parameters using the code I've pasted in my earlier post.

    Thanks again for your help.

    ~ MUTHU

    Posted 1 year ago #
  6. I'm afraid it won't be possible to pass parameters to hide certain fields.
    The only way to hide your fields is by using CSS code.

    So let say you have a field with id = element_1
    You can hide it using this CSS code:

    #li_1{
      display: none;
    }
    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.