drupal form api for radio button help needed - forms

i have to show a custom form like below
either upload image or paste a url for the image
O Radio button to set for image upload
-------Input field for image upload
OR
O Radio button to set image url
--------- input field to get that url
im struggling with custom form code whether to use #type=>radio or #type=>radios
if i use type radio then there is 2 radio button will create of either choice wont work
If i use type radios how can i separate the radios as per above design
Please guide me this situation,
Nithish.

I would use radios and then position the the image upload and input fields correctly using CSS.

Related

How to put gesture detector at specific points on the photo?

I will make an application with Flutter. I want to show different pop-ups when I click on certain parts of a photo that I imported from outside in the application.
For example, get a photo like this.
enter image description here
When I click on the fields I have determined in this photo, I want to give a pop-up according to the field and give information.
one more example.
I want to show what the button does by opening a pop-up when you put this png into practice and click on the fields I specified.
Do you have any suggestions for a resource or library that I can mark on the photo or help me?[!

Post values using forms and display front end

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.

Can I add a share button to a individual media items within in Tumbr text post?

I would very much like to add a share button to an individual image that is part of A text post with multiple media items.
I would like to learn where to put the code or if there's a theme that has this function.

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.

Send Button pop up custom image and text

I want to customize the text inside the send button pop up. I really have no clue how to do it. I am using the code i got from the fb dev page and changing the url with php.
I would like to change the other properties like picture, name and description since fb always show random images and texts.
Any clue?.
Here's how you specify og: tags for images and text: http://developers.facebook.com/docs/opengraph/