I have a content type field with machine name field_p_frontip
and for that i have a table node__field_p_frontip
and in that there is field value like field_p_frontip_value
. Eventhough i manually inserted a value in to that field its not taking effect in the front end . I updated the value in the node_revision__field_p_frontip
table too and cleared the cache .Why its not working ,any idea ?
I done this because i done via hook_form_alter
and its not taking effect .
node__field_p_frontip
table structre :
+-----------------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+------------------+------+-----+---------+-------+
| bundle | varchar(128) | NO | MUL | | |
| deleted | tinyint(4) | NO | PRI | 0 | |
| entity_id | int(10) unsigned | NO | PRI | NULL | |
| revision_id | int(10) unsigned | NO | MUL | NULL | |
| langcode | varchar(32) | NO | PRI | | |
| delta | int(10) unsigned | NO | PRI | NULL | |
| field_p_frontip_value | longtext | NO | | NULL | |
+-----------------------+------------------+------+-----+---------+-------+
and node_revision__field_p_frontip
table structure :
+-----------------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+------------------+------+-----+---------+-------+
| bundle | varchar(128) | NO | MUL | | |
| deleted | tinyint(4) | NO | PRI | 0 | |
| entity_id | int(10) unsigned | NO | PRI | NULL | |
| revision_id | int(10) unsigned | NO | PRI | NULL | |
| langcode | varchar(32) | NO | PRI | | |
| delta | int(10) unsigned | NO | PRI | NULL | |
| field_p_frontip_value | longtext | NO | | NULL | |
+-----------------------+------------------+------+-----+---------+-------+
From Berdir's comment
I was trying to set the value of the field 'field_p_frontip
' in form_alter as follows , but both didnt worked .
$form['field_p_frontip']["en"][0]['#default_value']['value'] ='192.168.1.100'; $form['field_p_frontip']['#default_value'] = '192.168.1.100';