By nhero on
I have created a custom form module that I would like to use on a couple of different pages. I can access the form by its path drupal/formexample but I would like to use this on a couple of different pages. How do I get the form to show up on my page?
Comments
Download and install the
Download and install the 'Views' module (if you haven't already), then create a block view. Go to the 'Blocks' page in the admin and insert your new form block into the top or bottom content region (if you want it to display at the top or bottom of the page).
Next, click 'Configure' next to the block and at the bottom type the paths to every page you want the block to appear on.
This should do the trick, reply if you have any questions.
I have just installed the
I have just installed the 'Views' module. I clicked add which prompted for a view name and I named my view 'testview'. That brought me to the edit tab. I then selected Block under defaults and clicked save and received the following error: 'Display "Defaults" uses fields but there are none defined for it or all are excluded.' What am I doing wrong?
Go to the "Default" view
Go to the "Default" view (this applies settings to all view types for the specific view you are editing). Now set the 'Row Style' to Node or Fields. Choosing Node will just display either the teaser or body (full) version of the node. Choosing Fields allows you to select specifically which fields from the node are displayed.
Drupal is just telling you that you need to choose one or the other.
I was able to query for nodes
I was able to query for nodes and ended up using node/4 for test purposes. In the preview the page is showing up. After saving when I go to administer->site building->blocks my new block isn't showing up. So that leaves me with a couple of questions: how do I query for my module formexample in the view and how do I see the block in site building->blocks?
The view is now showing up as
The view is now showing up as a block after I clicked on block settings-> admin and added an admin description. Now I just need to figure out how to get my module in the view.