1

I have a Fabrik form that I display on my website using this code:

{fabrik view=form id=33 elements=1 }

And the result is this:

enter image description here

Is there any way that I can display only one element from this form?

  • 1
    Hi M. Akram, welcome to Joomla Stack Exchange. Please add some more detail to your question, as it's likely to be closed as "Unclear what you're asking". Where is the form generated, how (PHP, jQuery etc.) and when (on field change, on submission etc.) do you want to get the value, and what have you tried? Maybe take the tour or read the help section. – johanpw Dec 16 '15 at 3:14
  • i write this code {fabrik view=form id=33 elements=1 } in my arcticles..and it show the full form....is there any code that i can pick only 1 element from that full form? – M. Akram Dec 16 '15 at 3:25
  • Just to be clear, you are using the Joomla extension called Fabrik? and you want to show just one element (such as Address1) and nothing else? – TryHarder Dec 16 '15 at 4:49
  • yes..i just want to show just one element only .. – M. Akram Dec 16 '15 at 7:46
1

I haven't used Fabrik very much, but based on the documentation, it looks like the elements=1 parameter only works for lists, example:

{fabrik view=list id=1 elements=6}

This will display the list with ID=1, and only list element with ID=6.

If you want to display only one field from your form, you can try one of these options:

  1. Create a new form tutorial here, and add only a single element. Then display this form in your article.

  2. Using CSS, you can target the other elements in your form and hide them using display:none. Without seeing your form I can't tell you what CSS to use, but it would look something like this:

    form.fabrikForm .fb_el_demo_form_paginate___name {
        display: none;
    }
    

    (edit .fb_el_demo_form_paginate___name as needed to fit the CSS class of your field.)

    You would have to do this for each of the fields you want to hide. Also make sure none of the hidden fields are marked as required, as this would make your form impossible to submit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.