Post values using forms and display front end - forms

I am very newbie to drupal 8 ,I want to add Content from back end and list in front end.
I tried to create a contact form from back end.here is my form
I don't want to send emails.only display the added item
After submit to database i want to list items.is this method is wrong?
But now the contact form not listing anything?Is my way is okay? please correct me

Create content type with your field like Name and PDF then there will be following options to display on front page:
Tick the box - promoted to front page
Create a new Drupal page view using views to display the content on front page.

Related

Drupal 8 - Change position of the Save Preview Button in a form

I'm using Drupal version 8.6.10 with the default Bartik theme.
I created a new content type called Post and I would the change position of the "Save" and "Preview" buttons of the form used when creating a new Post.
Actually these buttons are shown immediately after the Title as you can see in the following picture:
Instead I want them to be shown at the end of the form.
These are the Post manage display settings:
I don't understand why this doesn't happen with the default content types provided by drupal (Article and Basic Page) but only with the content types I add.
How can I change that?
You probably disabled the title position at some point and then re-enabled it without consideration for the position. The 'Manage display' setting you mentioned does not handle the positioning of the form element, it is meant for when you view content in read mode.
To resolve this, go to the 'Manage form display' tab of the specific content type and re-order the position of the title field (e.g. at the top of the field list).

sharepoint online, set edit item view as default instead new item view

I am working in a small SharePoint project to let school students pre-order the lunch online.
the main idea is the student can login to a school site, fill an order form.
I try use a list form to do it, just simply put a InfoPath form as web part on the home page.
When students open the site, he can fill the order form directly.
but the problem is the default view of this web part is always the new item form. so when a student already make the order, then login to site again,
how can I let him see his order and edit it instead a new order form.
another way may be use the form library, but i don't know how can i transfer the filed from the form to a list. because at last we still need a list instead a bunch of documents to get the summary of order.
Thank you for help.
Perhaps you can use a custom list and show that on the homepage?
A 'custom list' by default only has a title column but by adding more columns through the list settings you automatically add form fields on its new item form.
Since you are creating an order form you might want to hide the title column. Go to the settings of the list, then advanced settings, allow editing of content types. Then back in the list settings click the 'item' content type, then the title column then click the radio button for hidden.

use one text box with multiple form submit buttons ruby on rails

I'm making an app where I have multiple forms on one page but they are all similar; there is a text box and a submit button.
What I would like to do is consolidate all text boxes into one then have many submit buttons. That way the user inputs the data once in the obvious text box at top then decides which category (submit button) he would like to apply the data in the input box to.
Is this possible? I can't find and documentation on how to do this. Thanks!
You can do so by using <%= fomr_tag url: "/myCust" do %> method to create a form and wrap all the fields inside form tag. on submit button you will be redirect to /myCust method.
There you can get all the params in myCust method. You are using rails 4 then define all params under private method as it does. Store each of them. as you may want.

two view in the same page

I am working with asp.net MVC2, I'm new in development. net
I have a view that contains 2 dropdownlist and a button, I want when I click the button, another view is displayed, I want both to appear on the same page
There is two way you can implement this
1) With Complete post back you can use Html.RenderAction or load the partial view. You can use some flag to differentiate between the first time page load and post back
2) You can use the jquery AJAX and call the controller action of another View and get the content and write it to the div of the page .
Please do some research work on both and I think you can get the result as you want.

How to redirect to another page with Gravity forms drop down value?

I am trying to create a form in Gravity Forms that consists of a drop down menu. The drop down has names of pages on the site in labels and then corresponding values of page addresses in values. I am trying to send the user to page that they select. How would this be accomplished?
Actually, using the hook here:
http://www.gravityhelp.com/documentation/page/Gform_confirmation
You could grab the value of the dropdown and then redirect based on their selection once they submit the form.
Javascript.
// get your select element and listen for a change event on it
$('#the_drop_down').change(function() {
// set the window's location property to the value of the option the user has selected
window.location = $(this).val();
});
via: Redirect automatically when selecting an item from a select drop-down list
That post covers issues like IE compatibility and using a jQuery version.