Django: Hiding necessary forms on template page - css

I have a Django application which takes the lat/lon from a user's coordinates via HTML5 geolocation and places these into form fields via jQuery. Markers are then placed on a map using these coordinates. This works very well.
The problem: I want to hide these forms so they're invisible to the user, but these still need to be "on the page" so they can receive the information. So excluding these via the Django forms file won't be acceptable.
I tried one method which hid the form field but left the form label. I'd like to hide the entire row from the user and remove the space where the form field exists while it still remains in the background to receive the info.
Is this possible? Not sure if it requires a CSS trick or a something built-in to Django.
Any help or insight appreciated.

Give your forms an ID and in CSS set display: none for these IDs. Alternatively, use a common class instead of separate IDs.

Related

Wordpress - Display Content Conditionally

I am fairly new to Wordpress. I am writing a real estate site, and I want to have a Service Area page that displays the Counties that we serve in various states. So what I want to happen is to have a dropdown list where a user can select a state, and based on the state that they select, a text area will display that counties that we service in that state.
So basically, I want to store text content in the form of counties that will be displayed based on the conditions of a dropdown list.
I have no idea where to start. Is there a plugin that works for this kind of situation such as a form plugin that can store content, or am I going to have to write custom PHP/Javascript to make something like this happen. I am asking because this seems like a common scenario on websites, I just don't know where to look.
Thanks for any suggestions that you may have!!
So what I ended up doing was creating a select box in html that when a change happened on the list, a javascript function was called that changed the visibility of a text area and also set the value of its content to display all the counties that I needed. Ended up being much more simple than I expected. No PHP functions and short code necessary.

Is there a way to edit css of new google forms?

Before I used to be able to just copy the source code of the form and paste the part between <form></form> into the page and add my own styling. But this doesn't seem to work anymore.
Has anyone found a way to still be able to customize google forms?
Yes, you can easily make the <form> work by following these steps.
Create a Google Form.
Get the link and open the form in a new tab.
Create a barebone form having same items as the Google form.
Inspect Google form for action attribute.
a. Copy the same action to your form.
Inspect and find values for attributes name in the Google form.
a. Give the same name values for your form items as well. The values look like entry.742532386.
Check if your form gets the responses.
Since it is a native <form> element, apply CSS however you want to.
Read more here
Google forms does not currently (mar-2021) have a built in feature to add css or javascript to their forms.
I created this GitHub project to work around the problem: https://github.com/calledit/google_form_javascript_css

How to show web page/web resource in CRM Dynamics?

I am new to Microsoft Dynamics. I managed to create new solution and know how to add web resource to particular page like Contacts. Also, I have added few buttons to Ribbon control with their actions.
Now my problem is, I want to add a button either to ribbon control or anywhere in page, which I can access in complete CRM (like I can do in Master Page of asp.net), and which will help me open my web resource.
For example, if I click on Charts bar, web resource should be visible, otherwise it should be hidden.
My question may be lame, because I am very new to CRM Dynamics, kindly suggest my way is correct or I need to take some different approach?
If I understand it correctly you're looking for a way to add a button to multiple screens without need to modify each of them separately. (To avoid the pain when modifying all the ribbons or all the forms.)
In that case I'd suggest creating a separate JS web resource with code that adds a button with desired functionality, styling etc. And use Form Libraries Manager from XrmToolbox to bulk add the resource to all the forms.

Replace image field content in Drupal

I have a content type with image field and need to replace it with another image already uploaded on server. Best would be to do it with AJAX call to avoid page reload.
Is it just a matter of replacing "fid" in node's field value?
I've been messing with the ajax framework lately myself. There are probably better approaches, but the difficulty is in placing multiple ajax events on a single form element and file fields already have one on them.
One option could be to implement hook_ajax_render_alter, and add to/modify/replace what file_ajax_upload() provided in the $commands array as needed..

use html to get image and create link from database

I have a column in my database that stores images that are links, when i populate them in a gridview on my asp.net page I want it to display the image as a link but when i did it i just get the text below.
<img src="http://www.url.com/url/url/url/url.jpg">
My goal is to have a list of the images and when a user clicks the image they will go to another page. This is a start of my page, and i was attempting to use a gridview but now I am not sure what to do
Don't save markup
Instead just save a URL. In your case two of them since one points to *.html and the other to *.jpg. Or just without extensions if they're always the same except for the extensions. This way you can easily change your markup later and still use the same data from the DB.
But apart from this fact of not saving non-data in DB you could at least provide some relevant code you're using. We'd much easier tell you where you're doing it wrong.
Using GridView
The problem you're having are column templates. Check this link out and see how you can customize the display of a particular column in a GridView. Essentially you will have to provide your own template and do whatever you please with your DB data.

Resources