Adding entry to dropdown field in gravity forms - wordpress

What i want to achieve is to populate a form field with data previously stored in the database by a previous form. More specifically a dropdown list that loads a set of values that have been stored by the entries of a previous form.

here's a snippet I wrote that helps you do this.
https://gist.github.com/spivurno/9707874
You can add a plugin header to this and install as a plugin or install as a snippet via a snippet manager like Code Snippets.
You'll need to configure this to target your desired form and field and also modify the query args to populate the entries you want. You'll see a note next to each parameter letting you know what it does.

Related

How to change the case of submitted value of dropdown in Formidable Wordpress Plugin?

How to change the case of dropdown values in Formidable Wordpress Plugin?
FYI - Data is populated on the website via CSV using the Import/Export option of Formidable Plugin. Data is huge (1 million), so changing the case in the data itself is not a good option.
When the form is getting submitted, the value of Code Dropdown getting saved as "Forex", but I want value will get saved as "forex". Please suggest. Thanks in advance.
Following things I have tried:
Created New Custom CSS
Added this custom CSS into Lookup Field as:
Also tried to use Customize HTML from FORM Setting as:
Here in the customize HTML code, I am unable to understand, how to tweak it, so that submitted value will be in lowercase.
For anyone still looking for an answer on how to do this, Formidable provides the ability to do this by using seperate field values for the saved data.
Directly under the Dropdown Options you need to tick the checkbox:
Use separate values
Once this is ticked you will see an additional option for each field for the submitted value. That way you can enter the lowercase value you need in the save option field.
Note you may need a Formidable base license to see this option.
More info here:
https://formidableforms.com/knowledgebase/separate-values/

Wordpress Advanced Custom Fields - Limit A User's Choice To One Option

I have a WordPress website and as part of the news items, the editor can add either an:
internal link OR
external link OR
file
Currently I have this set up as a repeater field with maximum rows set to 1.
Is it possible if say one value has been entered, to prevent another of the values from being filled in.
E.g. I add an internal link and then try to add an external link. A message of some sort is then shown to me to say that only one value can be selected at a time.
I know I can add a description to the field with this information but I want to make it idiot proof so that the user can never add more than one value.
Thanks for your time and help in advance.
I can't write this in comments but celeriko right. Install types plugin there is ability of conditional logic. You can very easy implement of from backend.
Types: http://wp-types.com/
Reagrds

Drupal: List recently modified pages

In drupal, I would like to create a page like a site map, but also containing last modification date of each page and preferably mod author.
To clarify: I need to last date the page contents have changed, so this could be a change to the template or the underlying DB. Clearly, changing 1 DB entry can effect many pages.
Many thanks
Last changed timestamp is stored in node table under changed column. You can get this information from here & display it in the teaser.
If you need more sophisticated change control then you need to enable node revisions: http://drupal.org/node/320614
If you are using the views module, create a view for a sitemap and make an alias /sitemap or something similar.
When you add fields in the view, you can select: "Content: Updated date" as one of the fields. Any time this content is changed, it will use that timestamp as the field.
I hope this answers the question. If I misunderstand your question, I'll try to revise.

How to modify the Node Edit or Insert Form in Drupal

I am having trouble finding sources of information or example code for a creating a custom module (or any means) to edit the node edit/insert pages.
I am trying to create a Flickr Integration for a node. The Flickr API is not an issue and i can resolve those, it's the Drupal API issues i could use some help or resources of information on.
Here is what i am trying to achive.
User attempts to add or edit a node
User inserts a keyword into a field and presses a button (Get Photos)
Flickr API returns and displays a few images
User clicks on an image and the URL of the image is then added to an input field
on node save or node update a field such as $node->flickrImage[0][value] is updated with the URL selected in 4.
the variable is the available when ever the node is rendered.
I'm not quite sure how to achieve this - I simply need some example code of modifying the node edit/insert pages and I think I can work the rest out.
Please Help!
Thanks,
Shadi
It looks for me, that you can write own CCK field type, so that you can add this to desired content type and process user's input & work with flickr API.
this way, it's easier to manage this field and control it, plus it will be automatically added to node edit/create forms, node loads, etc.
This article might help http://www.lullabot.com/articles/creating-custom-cck-fields
Second way, is to use hook_form_alter
function module_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'product_node_form') {
//do smth
}
}
In this case, form_id you want to change, will be {content_type}_node_form.
there you can add your field, and process it on
hook_nodeapi
Here is a link for node edit form alter solution ..
http://drupal.org/node/101092

Wordpress: update all field values?

I want to update all field values (of a custom field) to a specific value. Would like to make it like a function and run it on a specific page or when button is clicked.
Possible?
Look here. A selection of custom keys and their values can be added to WordPress where as the custom keys and values a certain post is assigned is on a per post basis.
EDIT:
Try this Custom Fields plugin to see if it helps you administering your fields.

Resources