Jump to content

FormBuilder - Setting visibility restrictions.


johnners
 Share

Recommended Posts

Hey all,

I've got a form which has several visibility restrictions set - based on other form fields.

For example, 

show "Gritting Machinery" if they click on Gritting Machinery in the "own Machinery" field.

own_machinery=Gritting Machinery

In preview it works fine, however on the live site (hidden page) it just displays every single field even though they are unselected etc...

Am I missing something? I'm very very new to process wire (used to wordpress) so I'm learning rapidly but I cannot see anything wrong by googling etc.

 

Link to comment
Share on other sites

so on the template page I've got this in the header

$form = $forms->render('partner-form');

and then this further down the page

<?php echo $form; ?>

Is that what you mean?

I'm attempting to add a new page to an existing site - so I've copied the contact page template and renamed it as partner, then created a new page and assigned the template as partner - then set up a new form called partner_form and added all the fields etc in the backend.

Link to comment
Share on other sites

1 hour ago, johnners said:

Your link isn't working, but regardless, I suspect the following code is missing in the template file:

<?php echo $form->styles; ?>
<?php echo $form->scripts; ?>

Have a look, here:

1441210302_2022-06-1411_21_31-ContactFormselements.vieregg.design.thumb.png.71c6195f6cff0d0689989df57c90960d.png

I mostly use "Option B" to implement my forms when I don't need any fancy customization, so I don't have to worry about styles & scripts.

Link to comment
Share on other sites

Agh! thank you, I checked in the header include and there was some php only showing the form scripts and styles on the contact page, so allowed it on this page too and its now displaying, although all of labels are being hidden, meaning the checkboxes and radio's have no text lol

I love going through someone elses work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...