how can create Sub-Field inside a Field to using custom fields?
I want to create Sub-Field inside a Field such as Name field with Prefix Salutation.
Following figure for your understanding...
It is possible OR not?
If any one have solution of this question then tell me.
Related
Trying to create a form in symfony, where I would be linking a Category to a Post.
This is working perfectly, when using existing categories, and the dropdown.
However, I would like there to be a text field next to the dropdown, that when is not empty, creates a category and links it to the post.
I'm currently considering just adding the text field manually (in the twig), and reading the value from the request.
Is there a more elegant way to do this using forms ?
(I can't just comment post. What are your entities ? what symfony version ? show us what you have ever tried)
after submit data :
check if text field is empty
if not, check if category name exist
if not, persist and flush new category
then $yourObject->setCategory($newCategory)
persist and flush yourObject
You could create a collection. And use the allow_add property
I had Taxonomy category that must had such opportunity to add multiple fields from admin panel and get them like the picture.So for example what i can create that will give the user opportunity to add the fields dynamically and how can I get their values?
I found a solution and used plugin Custom Field Suite
It has a field type Loop and it was what I needed to add how many how needed.
I have a content type within which i'm using the Image field type and widget which provides a field for alt text and title. Now I'd like to add another field "link" to each image where I can define a custom link with each image. How can I do this?
Oh, I'm using Drupal 7...
Thanks,
Ron
If you want to avoid having to build your own module, I suggest you try Field Collection module. The module allows you to create a set of fields, combine it into one field and then use it as a field on content type.
You can create a field collection with one image field and link field, then output that as an image with link.
Please try this alter function - "multiupload_imagefield_widget_field_widget_form_alter"
i want to add one field in view from my module.Is there any way to add a field which is not in database to the drupal view?
Can you add a computed field (http://drupal.org/project/computed_field) to your nodes? This doesn't have to be stored in the database and it could use your module, or you could enter php code directly.
I have a cck field which is a user lookup. By default it looks at the "name". In my site we set the name to be the same as the email address and store the first and last name in a content profile.
When using the cck field the email adress in the name field is being shown. I wish to pull the content from the content profile instead. How would I override the select list (I will need to do this for all cck filed user lookups on the site).
I assume you're using the autocomplete function on a user reference field.
In userreference.module you will find the function userreference_menu, an implementation of hook_menu. There you see that a request to example.com/userreference/autocomplete (that's what the autocomeplete field does) calls the userreference_autocomplete function (a 'menu callback'). Now, what you need to do, is:
Create a custom module (see the documentation on drupal.org)
Create a new autocomplete menu callback (you can use the code from userreference_autocomplete and change it the way you want)
Change the menu item for userreference/autocomplete by implementing hook_menu_alter so it will call the function you created in step 2
Enable your module